diff options
author | Valery Piashchynski <[email protected]> | 2021-08-10 22:48:31 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-10 22:48:31 +0300 |
commit | d449d9d5aec1eec6d494064299feb1551f88ffe2 (patch) | |
tree | a905126b44bcfab29af9b5bc3eddaf5398375975 /plugins/jobs/drivers/beanstalk/connection.go | |
parent | a8a7f4194156440ef3157d8e5d75c43ed0327bcf (diff) |
Add support for the jobs-worker protocol for the beanstalk,ephemeral and
sqs drivers
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'plugins/jobs/drivers/beanstalk/connection.go')
-rw-r--r-- | plugins/jobs/drivers/beanstalk/connection.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/jobs/drivers/beanstalk/connection.go b/plugins/jobs/drivers/beanstalk/connection.go index ae223f39..32ca4188 100644 --- a/plugins/jobs/drivers/beanstalk/connection.go +++ b/plugins/jobs/drivers/beanstalk/connection.go @@ -61,6 +61,7 @@ func (cp *ConnPool) Put(_ context.Context, body []byte, pri uint32, delay, ttr t cp.RLock() defer cp.RUnlock() + // TODO(rustatian): redial based on the token id, err := cp.t.Put(body, pri, delay, ttr) if err != nil { // errN contains both, err and internal checkAndRedial error @@ -82,7 +83,6 @@ func (cp *ConnPool) Put(_ context.Context, body []byte, pri uint32, delay, ttr t // // Typically, a client will reserve a job, perform some work, then delete // the job with Conn.Delete. - func (cp *ConnPool) Reserve(reserveTimeout time.Duration) (uint64, []byte, error) { cp.RLock() defer cp.RUnlock() @@ -126,7 +126,7 @@ func (cp *ConnPool) redial() error { cp.Lock() // backoff here expb := backoff.NewExponentialBackOff() - // TODO set via config + // TODO(rustatian) set via config expb.MaxElapsedTime = time.Minute operation := func() error { |