add priority into task config
This commit is contained in:
parent
2d81147aaa
commit
a42d848d58
2 changed files with 11 additions and 0 deletions
5
job.go
5
job.go
|
@ -156,6 +156,11 @@ func (j *AuroraJob) IsService(isService bool) *AuroraJob {
|
|||
return j
|
||||
}
|
||||
|
||||
func (j *AuroraJob) Priority(priority int32) *AuroraJob {
|
||||
j.task.Priority(priority)
|
||||
return j
|
||||
}
|
||||
|
||||
func (j *AuroraJob) TaskConfig() *aurora.TaskConfig {
|
||||
return j.task.TaskConfig()
|
||||
}
|
||||
|
|
6
task.go
6
task.go
|
@ -287,6 +287,12 @@ func (t *AuroraTask) IsService(isService bool) *AuroraTask {
|
|||
return t
|
||||
}
|
||||
|
||||
//set priority for preemption or priority-queueing
|
||||
func (t *AuroraTask) Priority(priority int32) *AuroraTask {
|
||||
t.task.Priority = priority
|
||||
return t
|
||||
}
|
||||
|
||||
// Add a list of URIs with the same extract and cache configuration. Scheduler must have
|
||||
// --enable_mesos_fetcher flag enabled. Currently there is no duplicate detection.
|
||||
func (t *AuroraTask) AddURIs(extract bool, cache bool, values ...string) *AuroraTask {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue