eelcol
1 year ago

Release a job back on the queue, without increasing the number of tries

Posted 1 year ago by eelcol

Hi,

I have the following problem. I am using Redis for my jobs, and using a throttle function to throttle the use of the job. However, when using the ->release() function to release the job back on the queue, the variable numTries increases. This causes the job to fail, because the number of tries is too high.

How can I release a job back on the queue, without increasing the number of tries? I have found this thread:

https://github.com/laravel/ideas/issues/735

But I am unaware of its status. Also, someone suggested on that page using the following code:

$this->dispatch($this->delay(5));

This code results in errors at my end.

Thanks in advance,

Please sign in or create an account to participate in this conversation.