This adds the following function to the PartitionPolicy configuration to the Job interface (#91)

* Adding Partition Policy API
This commit is contained in:
Robert Allen 2018-12-20 16:38:06 -06:00 committed by Renan DelValle
parent 9a835631b2
commit 296af622d1
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
}