---
# System prepended metadata

title: Supervisor 設定方式

---

# Supervisor 設定方式

## 設定檔路徑

`/etc/supervisord.d`


## 設定檔參數

```
file name = peper-edm-worker.conf

[program:peper-edm-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /var/www/html/peper_kollway/artisan queue:work --queue=edm_job --sleep=5 --tries=3 --daemon
autostart=true
autorestart=true
user=centos
numprocs=2
redirect_stderr=true
stdout_logfile=/var/www/html/peper_kollway/storage/logs/peper-edm-worker.log
#stdout_logfile=NONE


需要調整的部分

1. [program:peper-edm-worker] -> 調成改為檔案名將做區分
2. command=/usr/bin/php /var/www/html/peper_kollway/artisan queue:work --queue=edm_job --sleep=5 --tries=3 --daemon -> queue=edm_job 這邊改成要做的 queue name

3. numprocs=2 -> 這邊可以調整要開的 Worker 數量 通常 1 即可
```