diff options
author | Valery Piashchynski <[email protected]> | 2021-08-11 13:44:41 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-11 13:44:41 +0300 |
commit | e855ae9fe5673bd95f45f9a265259cb5ecdc9f81 (patch) | |
tree | 6653231b4ad11ba93d3b1562c38a2798abb467ff /plugins/jobs/drivers | |
parent | de37ed3ae8d08a50d9ffe088c1d58d9dffdf7c9b (diff) |
Remove attempts from the proto, and general jobs options
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers')
-rw-r--r-- | plugins/jobs/drivers/beanstalk/item.go | 1 | ||||
-rw-r--r-- | plugins/jobs/drivers/ephemeral/consumer.go | 2 | ||||
-rw-r--r-- | plugins/jobs/drivers/ephemeral/requeue.go | 25 |
3 files changed, 0 insertions, 28 deletions
diff --git a/plugins/jobs/drivers/beanstalk/item.go b/plugins/jobs/drivers/beanstalk/item.go index 50c54b12..a5aa1791 100644 --- a/plugins/jobs/drivers/beanstalk/item.go +++ b/plugins/jobs/drivers/beanstalk/item.go @@ -123,7 +123,6 @@ func (i *Item) Requeue(headers map[string][]string, delay int64) error { } } - func fromJob(job *job.Job) *Item { return &Item{ Job: job.Job, diff --git a/plugins/jobs/drivers/ephemeral/consumer.go b/plugins/jobs/drivers/ephemeral/consumer.go index a778f59b..03959b49 100644 --- a/plugins/jobs/drivers/ephemeral/consumer.go +++ b/plugins/jobs/drivers/ephemeral/consumer.go @@ -62,7 +62,6 @@ func NewJobBroker(configKey string, log logger.Logger, cfg config.Configurer, eh // consume from the queue go jb.consume() - jb.requeueListener() return jb, nil } @@ -81,7 +80,6 @@ func FromPipeline(pipeline *pipeline.Pipeline, log logger.Logger, eh events.Hand // consume from the queue go jb.consume() - jb.requeueListener() return jb, nil } diff --git a/plugins/jobs/drivers/ephemeral/requeue.go b/plugins/jobs/drivers/ephemeral/requeue.go deleted file mode 100644 index afb97d54..00000000 --- a/plugins/jobs/drivers/ephemeral/requeue.go +++ /dev/null @@ -1,25 +0,0 @@ -package ephemeral - -import "context" - -// requeueListener should handle items passed to requeue -func (j *JobConsumer) requeueListener() { - go func() { - for { //nolint:gosimple - select { - case item, ok := <-j.requeueCh: - if !ok { - j.log.Info("requeue channel closed") - return - } - - // TODO(rustatian): what timeout to use? - err := j.handleItem(context.TODO(), item) - if err != nil { - j.log.Error("requeue handle item", "error", err) - continue - } - } - } - }() -} |