summaryrefslogtreecommitdiff
path: root/plugins/jobs/drivers/beanstalk/item.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/item.go')
-rw-r--r--plugins/jobs/drivers/beanstalk/item.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/jobs/drivers/beanstalk/item.go b/plugins/jobs/drivers/beanstalk/item.go
index 91dbf41c..50c54b12 100644
--- a/plugins/jobs/drivers/beanstalk/item.go
+++ b/plugins/jobs/drivers/beanstalk/item.go
@@ -111,9 +111,10 @@ func (i *Item) Nack() error {
return i.Options.conn.Delete(i.Options.id)
}
-func (i *Item) Requeue(delay int64) error {
+func (i *Item) Requeue(headers map[string][]string, delay int64) error {
// overwrite the delay
i.Options.Delay = delay
+ i.Headers = headers
select {
case i.Options.requeueCh <- i:
return nil
@@ -122,6 +123,7 @@ func (i *Item) Requeue(delay int64) error {
}
}
+
func fromJob(job *job.Job) *Item {
return &Item{
Job: job.Job,