mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-22 00:03:28 +01:00
32 lines
1.2 KiB
Desktop File
32 lines
1.2 KiB
Desktop File
[Unit]
|
|
Description=MediaCMS celery long queue
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=forking
|
|
User=www-data
|
|
Group=www-data
|
|
Restart=always
|
|
RestartSec=10
|
|
Environment=APP_DIR="/home/mediacms.io/mediacms"
|
|
Environment=CELERYD_NODES="long1"
|
|
Environment=CELERY_QUEUE="long_tasks"
|
|
Environment=CELERY_BIN="/home/mediacms.io/bin/celery"
|
|
Environment=CELERY_APP="cms"
|
|
Environment=CELERYD_MULTI="multi"
|
|
Environment=CELERYD_OPTS="-Ofair --prefetch-multiplier=1"
|
|
Environment=CELERYD_PID_FILE="/home/mediacms.io/mediacms/pids/%n.pid"
|
|
Environment=CELERYD_LOG_FILE="/home/mediacms.io/mediacms/logs/%N.log"
|
|
Environment=CELERYD_LOG_LEVEL="INFO"
|
|
Environment=APP_DIR="/home/mediacms.io/mediacms"
|
|
|
|
ExecStart=/bin/sh -c '${CELERY_BIN} multi start ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS} --workdir=${APP_DIR} -Q ${CELERY_QUEUE}'
|
|
|
|
ExecStop=/bin/sh -c '${CELERY_BIN} multi stopwait ${CELERYD_NODES} --pidfile=${CELERYD_PID_FILE}'
|
|
|
|
ExecReload=/bin/sh -c '${CELERY_BIN} multi restart ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS} --workdir=${APP_DIR} -Q ${CELERY_QUEUE}'
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
|