Answer the question
In order to leave comments, you need to log in
How to organize parallel execution of tasks with redis in laravel?
You need to run parallel tasks in the background. Each task takes several hours to complete.
For this, as I understand it, laravel uses queues, but each task is executed in turn, and I need to run them in parallel. How can you run the next task in the background without waiting for one task to complete? Maybe I'm not digging there at all and I need to use something else for this?
Tasks are started like this:
$job = (new \App\Jobs\name_task($params))->delay(1);
dispatch($job);
php artisan queue:listen redis --timeout=0
Answer the question
In order to leave comments, you need to log in
Something about threads: https://habrahabr.ru/post/300952/
Something about processes: www.phphighload.com/2012/07/pcntl.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question