39 lines
901 B
Markdown
Executable File
39 lines
901 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 /home/arifal/development/sibedas-pbg-web/artisan queue:work --queue=default --timeout=14400 --tries=1 --sleep=3
|
|
autostart=true
|
|
autorestart=true
|
|
numprocs=4
|
|
redirect_stderr=true
|
|
stdout_logfile=/home/arifal/development/sibedas-pbg-web/storage/logs/worker.log
|
|
stopasgroup=true
|
|
killasgroup=true
|
|
```
|
|
|
|
- Reload Supervisor
|
|
|
|
```
|
|
sudo supervisorctl reread
|
|
sudo supervisorctl update
|
|
sudo supervisorctl start laravel-worker
|
|
sudo supervisorctl restart laravel-worker
|
|
sudo supervisorctl status
|
|
```
|