首页 > 系统相关 >Ubuntu18.04 supervisord 配置celeryd

Ubuntu18.04 supervisord 配置celeryd

时间:2022-10-09 18:58:01浏览次数:55  
标签:celeryd supervisord -- worker celery command var Ubuntu18.04 log

1.
groupadd celery
useradd -r -g celery -s /bin/false celery
mkdir -p  /var/log/celery/
chown celery:celery /var/log/celery/

; ==================================
;  celery worker supervisor example
; ==================================

[program:celery]
; Directory should become before command
directory=/root/Soft/back-end/# 项目根目录

user=root#user
numprocs=1
stdout_logfile=/var/log/celery/worker.log
stderr_logfile=/var/log/celery/worker.log
autostart=true
autorestart=true
startsecs=10

; Set full path to celery program if using virtualenv
command=/usr/local/bin/celery -A tester_django worker --loglevel=INFO

; Alternatively,
;command=celery --app=your_app.celery:app worker --loglevel=INFO -n worker.%%h
; Or run a script
;command=celery.sh

; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600

; Causes supervisor to send the termination signal (SIGTERM) to the whole process group.
stopasgroup=true

; Set Celery priority higher than default (999)
; so, if rabbitmq is supervised, it will start first.
priority=1000

标签:celeryd,supervisord,--,worker,celery,command,var,Ubuntu18.04,log
From: https://www.cnblogs.com/liuer-mihou/p/16773264.html

相关文章