/
job_constraints.go
35 lines (27 loc) · 1.62 KB
/
job_constraints.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
)
// JobConstraints The execution constraints for a job.
// swagger:model JobConstraints
type JobConstraints struct {
// The maximum number of times each task may be retried. The Batch service retries a task if its exit code is nonzero.
//
// Note that this value specifically controls the number of retries. The Batch service will try each task once, and may then retry up to this limit. For example, if the maximum retry count is 3, Batch tries a task up to 4 times (one initial try and 3 retries). If the maximum retry count is 0, the Batch service does not retry tasks. If the maximum retry count is -1, the Batch service retries tasks without limit. The default value is 0 (no retries).
MaxTaskRetryCount int32 `json:"maxTaskRetryCount,omitempty"`
// The maximum elapsed time that the job may run, measured from the time the job is created.
//
// If the job does not complete within the time limit, the Batch service terminates it and any tasks that are still running. In this case, the termination reason will be MaxWallClockTimeExpiry. If this property is not specified, there is no time limit on how long the job may run.
MaxWallClockTime strfmt.Duration `json:"maxWallClockTime,omitempty"`
}
// Validate validates this job constraints
func (m *JobConstraints) Validate(formats strfmt.Registry) error {
var res []error
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}