summaryrefslogtreecommitdiff
path: root/plugins/jobs/job/job_options.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/job/job_options.go')
-rw-r--r--plugins/jobs/job/job_options.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/plugins/jobs/job/job_options.go b/plugins/jobs/job/job_options.go
index af971d15..133ae1a8 100644
--- a/plugins/jobs/job/job_options.go
+++ b/plugins/jobs/job/job_options.go
@@ -14,10 +14,6 @@ type Options struct {
// Delay defines time duration to delay execution for. Defaults to none.
Delay int64 `json:"delay,omitempty"`
- // Attempts define maximum job retries. Attention, value 1 will only allow job to execute once (without retry).
- // Minimum valuable value is 2.
- Attempts int64 `json:"maxAttempts,omitempty"`
-
// RetryDelay defines for how long job should be waiting until next retry. Defaults to none.
RetryDelay int64 `json:"retryDelay,omitempty"`
@@ -31,10 +27,6 @@ func (o *Options) Merge(from *Options) {
o.Pipeline = from.Pipeline
}
- if o.Attempts == 0 {
- o.Attempts = from.Attempts
- }
-
if o.Timeout == 0 {
o.Timeout = from.Timeout
}
@@ -48,12 +40,6 @@ func (o *Options) Merge(from *Options) {
}
}
-// CanRetry must return true if broker is allowed to re-run the job.
-func (o *Options) CanRetry(attempt int64) bool {
- // Attempts 1 and 0 has identical effect
- return o.Attempts > (attempt + 1)
-}
-
// RetryDuration returns retry delay duration in a form of time.Duration.
func (o *Options) RetryDuration() time.Duration {
return time.Second * time.Duration(o.RetryDelay)