Feb 28, 2025
0
Level 1
Laravel Octane and Swoole for concurrent tasks
Hello! I have a goal to run several console commands running in the background. Each of the commands can handle concurrent tasks. Since Laravel Octane has Swoole supporting, and it supports concurrent tasks, I chose Laravel Octane + Swoole. However, when I run a console command in supervisor (so that it always runs), then it works as non-concurrent requests.
Example:
[program:command1]
process_name=%(program_name)s_%(process_num)02d
command=php artisan run:command1
autostart=true
autorestart=true
user=root
numprocs=1
Concurrent tasks are executed only when the octane:start command is executed.
Could you tell, how can I run a console command in the background, but at the same time so that it can work with concurrent requests?
Please or to participate in this conversation.