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.go28
1 files changed, 0 insertions, 28 deletions
diff --git a/plugins/jobs/job/job_options.go b/plugins/jobs/job/job_options.go
index 133ae1a8..b7e4ed36 100644
--- a/plugins/jobs/job/job_options.go
+++ b/plugins/jobs/job/job_options.go
@@ -13,12 +13,6 @@ type Options struct {
// Delay defines time duration to delay execution for. Defaults to none.
Delay int64 `json:"delay,omitempty"`
-
- // RetryDelay defines for how long job should be waiting until next retry. Defaults to none.
- RetryDelay int64 `json:"retryDelay,omitempty"`
-
- // Reserve defines for how broker should wait until treating job are failed. Defaults to 30 min.
- Timeout int64 `json:"timeout,omitempty"`
}
// Merge merges job options.
@@ -27,34 +21,12 @@ func (o *Options) Merge(from *Options) {
o.Pipeline = from.Pipeline
}
- if o.Timeout == 0 {
- o.Timeout = from.Timeout
- }
-
- if o.RetryDelay == 0 {
- o.RetryDelay = from.RetryDelay
- }
-
if o.Delay == 0 {
o.Delay = from.Delay
}
}
-// RetryDuration returns retry delay duration in a form of time.Duration.
-func (o *Options) RetryDuration() time.Duration {
- return time.Second * time.Duration(o.RetryDelay)
-}
-
// DelayDuration returns delay duration in a form of time.Duration.
func (o *Options) DelayDuration() time.Duration {
return time.Second * time.Duration(o.Delay)
}
-
-// TimeoutDuration returns timeout duration in a form of time.Duration.
-func (o *Options) TimeoutDuration() time.Duration {
- if o.Timeout == 0 {
- return 30 * time.Minute
- }
-
- return time.Second * time.Duration(o.Timeout)
-}