File tree Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Expand file tree Collapse file tree 3 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,21 @@ For a complete listing of the command-line options available see:
94
94
95
95
$ celery events --help
96
96
97
+ If you would like to use ``systemd `` to run the process, there are example
98
+ configuration files available under the ``extra/systemd/ `` folder. After placing
99
+ the ``celerycam.conf `` under ``/etc/ ``, and ``celerycam.service `` under
100
+ ``/etc/systemd/system/ ``, you will be able to use the ``systemctl `` command to
101
+ control the daemon. For example:
102
+
103
+ .. code-block :: console
104
+
105
+ $ systemctl start celerycam
106
+
107
+ .. code-block :: console
108
+
109
+ $ systemctl stop celerycam
110
+
111
+
97
112
Configuration
98
113
=============
99
114
@@ -147,4 +162,3 @@ In your Celery configuration simply set them to override the defaults, e.g.::
147
162
.. |pyimp | image :: https://img.shields.io/pypi/implementation/django-celery-monitor.svg
148
163
:alt: Support Python implementations.
149
164
:target: http://pypi.python.org/pypi/django_celery_monitor/
150
-
Original file line number Diff line number Diff line change
1
+ # Absolute or relative path to the 'celery' command:
2
+ CELERY_BIN="/usr/bin/celery"
3
+ CELERY_APP="proj"
4
+
5
+ # Where to chdir at start.
6
+ CELERYCAM_CHDIR="/opt/celery"
7
+
8
+ # Extra arguments to celerycam
9
+ CELERYCAM_OPTS="--camera django_celery_monitor.camera.Camera --frequency=2.0"
10
+
11
+ CELERYCAM_LOG_FILE="/var/log/celery/celerycam.log"
12
+ CELERYCAM_PID_FILE="/var/run/celery/celery_cam.pid"
13
+ CELERYCAM_LOG_LEVEL="INFO"
Original file line number Diff line number Diff line change
1
+ [Unit]
2
+ Description =Celery Camera Service
3
+ After =network.target
4
+
5
+ [Service]
6
+ Type =simple
7
+ User =celery
8
+ Group =celery
9
+ EnvironmentFile =/etc/sysconfig/celerycam
10
+ WorkingDirectory =/opt/celery
11
+ ExecStart =/bin/sh -c '${CELERY_BIN} events -A ${CELERY_APP} \
12
+ --workdir=${CELERYCAM_CHDIR} \
13
+ --pidfile=${CELERYCAM_PID_FILE} \
14
+ --logfile=${CELERYCAM_LOG_FILE} \
15
+ --loglevel=${CELERYCAM_LOG_LEVEL} \
16
+ ${CELERYCAM_OPTS}'
17
+ ExecStop =/bin/systemctl kill celerycam.service
18
+
19
+ [Install]
20
+ WantedBy =multi-user.target
You can’t perform that action at this time.
0 commit comments