38 lines
808 B
Markdown
Executable File
38 lines
808 B
Markdown
Executable File
# Usage icon
|
|
|
|
search or pick icon in <a href="https://icon-sets.iconify.design/mingcute/?keyword=mingcute">here</a>
|
|
|
|
# Set up queue for running automatically
|
|
|
|
- Install Supervisor
|
|
|
|
```
|
|
sudo apt update && sudo apt install supervisor -y
|
|
```
|
|
|
|
- Create Supervisor Config
|
|
|
|
```
|
|
sudo nano /etc/supervisor/conf.d/laravel-worker.conf
|
|
|
|
[program:laravel-worker]
|
|
process_name=%(program_name)s_%(process_num)02d
|
|
command=php /path-to-your-project/artisan queue:work --tries=3 --timeout=600
|
|
autostart=true
|
|
autorestart=true
|
|
numprocs=1
|
|
user=www-data
|
|
redirect_stderr=true
|
|
stdout_logfile=/var/log/supervisor/laravel-worker.log
|
|
```
|
|
|
|
- Reload Supervisor
|
|
|
|
```
|
|
sudo supervisorctl reread
|
|
sudo supervisorctl update
|
|
sudo supervisorctl start laravel-worker
|
|
sudo supervisorctl restart laravel-worker
|
|
sudo supervisorctl status
|
|
```
|