File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ CELERYD_NODES="w1"
10
10
11
11
# Absolute or relative path to the 'celery' command:
12
12
CELERY_BIN="/opt/gitconsensus/venv/bin/celery"
13
- #CELERY_BIN="/virtualenvs/def/bin/celery"
14
13
15
14
# App instance to use
16
15
# comment out this line if you don't use an app
@@ -27,6 +26,6 @@ CELERYD_OPTS="--time-limit=120 --concurrency=4"
27
26
# - %n will be replaced with the first part of the nodename.
28
27
# - %I will be replaced with the current child process index
29
28
# and is important when using the prefork pool to avoid race conditions.
30
- CELERYD_PID_FILE="/var/run/celery/ %n.pid"
31
- CELERYD_LOG_FILE="/var/log/celery/ %n%I.log"
29
+ CELERYD_PID_FILE="/var/run/gitconsensus/worker- %n.pid"
30
+ CELERYD_LOG_FILE="/var/log/gitconsensus/worker- %n%I.log"
32
31
CELERYD_LOG_LEVEL="INFO"
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ User=gitconsensus
8
8
Group =gitconsensus
9
9
EnvironmentFile =-/etc/gitconsensus/celery
10
10
WorkingDirectory =${CELERY_HOME}
11
- ExecStart =/bin/sh -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi start ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
12
- ExecStop =/bin/sh -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi stopwait ${CELERYD_NODES} --pidfile=${CELERYD_PID_FILE}'
13
- ExecReload =/bin/sh -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi restart ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
11
+ ExecStart =/bin/bash -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi start ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
12
+ ExecStop =/bin/bash -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi stopwait ${CELERYD_NODES} --pidfile=${CELERYD_PID_FILE}'
13
+ ExecReload =/bin/bash -c 'source ${CELERY_HOME}/bin/envvar && ${CELERY_BIN} multi restart ${CELERYD_NODES} -A ${CELERY_APP} --pidfile=${CELERYD_PID_FILE} --logfile=${CELERYD_LOG_FILE} --loglevel=${CELERYD_LOG_LEVEL} ${CELERYD_OPTS}'
14
14
15
15
[Install]
16
16
WantedBy =multi-user.target
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ cp $DIR/etc/gitconsensus/celery /etc/gitconsensus/celery
15
15
16
16
adduser --gecos " " --disabled-login gitconsensus
17
17
18
+ mkdir /var/run/gitconsensus
19
+ chown gitconsensus:gitconsensus /var/run/gitconsensus
20
+ mkdir /var/log/gitconsensus
21
+ chown gitconsensus:gitconsensus /var/log/gitconsensus
22
+
18
23
echo " d /var/run/celery 0755 celery celery -" >> /etc/tmpfiles.d/celery.conf
19
24
echo " d /var/log/celery 0755 celery celery - " >> /etc/tmpfiles.d/celery.conf
20
25
26
+ systemctl daemon-reload
You can’t perform that action at this time.
0 commit comments