diff options
author | Valery Piashchynski <[email protected]> | 2021-08-12 13:25:36 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-12 13:25:36 +0300 |
commit | ecbfc5c5265a9895f4e371ce4388f64df8714e63 (patch) | |
tree | df0749155487eae6bcdbb2456885131a21916f4d /plugins/jobs/job/job_options.go | |
parent | 4169e8374f581ba2213f8cd1833cc6b9b84438e8 (diff) |
Remove unneeded options, complete tests for the ephemeral, update proto
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/job/job_options.go')
-rw-r--r-- | plugins/jobs/job/job_options.go | 28 |
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) -} |