0
我想讓芹菜作爲服務運行,並且遇到了CELERYBEAT_OPTS參數的問題。我可以開始芹菜服務就好了,我能夠通過這樣的命令行啓動celerybeat罰款:Celerybeat服務未啓動
celery -A base beat -S djcelery.schedulers.DatabaseScheduler -l debug --pidfile=/tmp/celerybeat.pid
但是,當我開始喜歡這個celerybeat服務:
sudo service celerybeat start
它不沒有開始。
下面是在的/ etc /默認/ celerybeat我celerybeat配置文件:
export DJANGO_SETTINGS_MODULE="settings"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/path/to/.virtualenvs/django/bin/celery"
# Where to chdir at start.
CELERYD_CHDIR="/srv/myproj/"
# Extra arguments to celerybeat
# When the below line is commented out, the service starts!?!
CELERYBEAT_OPTS="-S djcelery.schedulers.DatabaseScheduler"
CELERYBEAT_LOG_FILE="/var/log/celery/beat.log"
CELERYBEAT_PID_FILE="/var/run/celery/beat.pid"
# Workers should run as an unprivileged user.
# You need to create this user manually (or you can choose
# a user/group combination that already exists, e.g. nobody).
CELERYBEAT_USER="myuser"
CELERYBEAT_GROUP="mygroup"
而且最奇怪的一部分,如在配置文件中指出的那樣,如果我註釋掉CELERYBEAT_OPTS線,我可以開始服務只需使用服務命令即可。因此,當我在配置文件中指定CELERYBEAT_OPTS =「 - S djcelery.schedulers.DatabaseScheduler」時,導致服務無法啓動。有沒有人有任何線索這裏發生了什麼,或者我怎麼能夠解決它?謝謝。