mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Supervisor celery simplification (#849)
Combines celery confs under one process group for easy restarting. Updates docs to reflect new commands.
This commit is contained in:
parent
049c1c66aa
commit
dc8ed2d510
@ -22,7 +22,7 @@ CentOS:
|
||||
|
||||
Auth provides example config files for the celery workers, the periodic task scheduler (celery beat), and the mumble authenticator. All of these are available in `thirdparty/Supervisor`.
|
||||
|
||||
For most users, all you have to do is copy the config files to `/etc/supervisor/conf.d` then restart the service. Copy `auth-celerybeat.conf` and `auth-celeryd.conf` for the celery workers, and `auth-mumble.conf` for the mumble authenticator. For all three just use a wildcard:
|
||||
For most users, all you have to do is copy the config files to `/etc/supervisor/conf.d` then restart the service. Copy `auth.conf` for the celery workers, and `auth-mumble.conf` for the mumble authenticator. For all three just use a wildcard:
|
||||
|
||||
sudo cp thirdparty/Supervisor/* /etc/supervisor/conf.d
|
||||
|
||||
@ -45,6 +45,24 @@ Processes will be `STARTING`, `RUNNING`, or `ERROR`. If an error has occurred, c
|
||||
- celery beat: `log/beat.log`
|
||||
- authenticator: `log/authenticator.log`
|
||||
|
||||
## Restarting Processes
|
||||
|
||||
To restart the celery group:
|
||||
|
||||
sudo supervisorctl restart auth:*
|
||||
|
||||
To restart just celerybeat:
|
||||
|
||||
sudo supervisorctl restart auth:celerybeat
|
||||
|
||||
To restart just celeryd:
|
||||
|
||||
sudo supervisorctl restart auth:celeryd
|
||||
|
||||
To restart just mumble authenticator:
|
||||
|
||||
sudo supervisorctl restart auth-mumble
|
||||
|
||||
## Customizing Config Files
|
||||
|
||||
The only real customization needed is if running in a virtual environment. The python path will have to be changed in order to start in the venv.
|
||||
|
10
thirdparty/Supervisor/auth-celerybeat.conf
vendored
10
thirdparty/Supervisor/auth-celerybeat.conf
vendored
@ -1,10 +0,0 @@
|
||||
[program:auth-celerybeat]
|
||||
command=celery -A alliance_auth beat
|
||||
directory=/home/allianceserver/allianceauth
|
||||
user=allianceserver
|
||||
stdout_logfile=/home/allianceserver/allianceauth/log/beat.log
|
||||
stderr_logfile=/home/allianceserver/allianceauth/log/beat.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=10
|
||||
priority=999
|
13
thirdparty/Supervisor/auth-celeryd.conf
vendored
13
thirdparty/Supervisor/auth-celeryd.conf
vendored
@ -1,13 +0,0 @@
|
||||
[program:auth-celeryd]
|
||||
command=celery -A alliance_auth worker
|
||||
directory=/home/allianceserver/allianceauth
|
||||
user=allianceserver
|
||||
numprocs=1
|
||||
stdout_logfile=/home/allianceserver/allianceauth/log/worker.log
|
||||
stderr_logfile=/home/allianceserver/allianceauth/log/worker.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=10
|
||||
stopwaitsecs = 600
|
||||
killasgroup=true
|
||||
priority=1000
|
28
thirdparty/Supervisor/auth.conf
vendored
Normal file
28
thirdparty/Supervisor/auth.conf
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
[program:celerybeat]
|
||||
command=celery -A alliance_auth beat
|
||||
directory=/home/allianceserver/allianceauth
|
||||
user=allianceserver
|
||||
stdout_logfile=/home/allianceserver/allianceauth/log/beat.log
|
||||
stderr_logfile=/home/allianceserver/allianceauth/log/beat.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=10
|
||||
priority=998
|
||||
|
||||
[program:celeryd]
|
||||
command=celery -A alliance_auth worker
|
||||
directory=/home/allianceserver/allianceauth
|
||||
user=allianceserver
|
||||
numprocs=1
|
||||
stdout_logfile=/home/allianceserver/allianceauth/log/worker.log
|
||||
stderr_logfile=/home/allianceserver/allianceauth/log/worker.log
|
||||
autostart=true
|
||||
autorestart=true
|
||||
startsecs=10
|
||||
stopwaitsecs = 600
|
||||
killasgroup=true
|
||||
priority=998
|
||||
|
||||
[group:auth]
|
||||
programs=celerybeat,celeryd
|
||||
priority=999
|
Loading…
x
Reference in New Issue
Block a user