Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel queue retries delay

I am building a large application using Laravel and find the use of queue in this application. I am now using beanstalkd service for this. However, I am stuck in finding an answer for this set up. Is there a way to put the queue retries be processed in not instantly manner. I wanted it to be retried after n seconds. Thanks

like image 263
jellyfication Avatar asked Sep 16 '25 01:09

jellyfication


2 Answers

Try using the inbuilt Queue service and use the following

Queue::later(Carbon::now()->addMinutes(1), $task);

Relevant docs

like image 160
Scopey Avatar answered Sep 18 '25 17:09

Scopey


In the queue:work command --delay option is deprecated.

You have to use --backoff

--backoff[=BACKOFF]    The number of seconds to wait before retrying a job that encountered an uncaught exception [default: "0"]
like image 30
b3ni Avatar answered Sep 18 '25 18:09

b3ni