Add tier & production in task config (#14)

This commit is contained in:
lenhattan86 2021-10-15 12:18:26 -07:00 committed by GitHub
parent a75b691d72
commit fe664178ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 76 additions and 4 deletions

View file

@ -85,6 +85,10 @@ func TaskFromThrift(config *aurora.TaskConfig) *AuroraTask {
newTask.Tier(*config.Tier)
}
if config.Production != nil {
newTask.Production(*config.Production)
}
if config.ExecutorConfig != nil {
newTask.
ExecutorName(config.ExecutorConfig.Name).
@ -294,6 +298,11 @@ func (t *AuroraTask) Priority(priority int32) *AuroraTask {
return t
}
func (t *AuroraTask) Production(production bool) *AuroraTask {
t.task.Production = &production
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 {