This adds the following function to the PartitionPolicy configuration to the Job interface (#91)
* Adding Partition Policy API
This commit is contained in:
parent
9a835631b2
commit
296af622d1
2 changed files with 46 additions and 0 deletions
8
job.go
8
job.go
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue