This adds the following function to the PartitionPolicy configuration to the Job interface

`PartitionPolicy(&aurora.PartitionPolicy{Reschedule: true, DelaySecs: &partitionDelay})`
This commit is contained in:
Robert Allen 2018-12-20 16:04:28 -06:00
parent 9a835631b2
commit 5c006ebbed
2 changed files with 46 additions and 0 deletions

8
job.go
View file

@ -55,6 +55,7 @@ type Job interface {
GetInstanceCount() int32
MaxFailure(maxFail int32) Job
Container(container Container) Job
PartitionPolicy(policy *aurora.PartitionPolicy) Job
}
// Structure to collect all information pertaining to an Aurora job.
@ -315,3 +316,10 @@ func (j *AuroraJob) Container(container Container) Job {
return j
}
// Set a partition policy for the job configuration to implement.
func (j *AuroraJob) PartitionPolicy(policy *aurora.PartitionPolicy) Job {
j.jobConfig.TaskConfig.PartitionPolicy = policy
return j
}