Closed wlach closed 6 years ago
Oh one thing may be useful:
diff --git a/bin/run b/bin/run
index 25a6ba3..09b81e9 100755
--- a/bin/run
+++ b/bin/run
@@ -6,6 +6,7 @@ set -eo pipefail
: "${SLEEP:=1}"
: "${TRIES:=60}"
: "${MONITOR_PIDFILE:=/app/celerymonitor.pid}"
+: "${SCHEDULER_PIDFILE:=/app/celerybeat.pid}"
usage() {
echo "usage: bin/run web|web-dev|test"
@@ -42,12 +43,13 @@ case $1 in
exec python manage.py runserver 0.0.0.0:${PORT}
;;
worker)
- exec newrelic-admin run-program celery -A missioncontrol.celery:celery worker -l info -O fair --events --concurrency=8
+ exec newrelic-admin run-program celery -A missioncontrol.celery:celery worker -l info --events --concurrency=8
;;
scheduler)
+ [ -f ${SCHEDULER_PIDFILE} ] && rm ${SCHEDULER_PIDFILE}
python manage.py migrate --noinput
exec newrelic-admin run-program celery -A missioncontrol.celery:celery \
- beat -l info --pidfile /tmp/celerybeat.pid
+ beat -l info --pidfile ${SCHEDULER_PIDFILE}
;;
monitor)
[ -f ${MONITOR_PIDFILE} ] && rm ${MONITOR_PIDFILE}
And also:
@@ -321,6 +323,16 @@ LOGGING = {
'handlers': ['console'],
'propagate': False,
},
+ 'celery.task': {
+ 'level': 'DEBUG',
+ 'handlers': ['console'],
+ 'propagate': False,
+ },
+ 'redbeat.schedulers': {
+ 'level': 'DEBUG',
+ 'handlers': ['console'],
+ 'propagate': False,
+ },
'request.summary': {
'level': 'DEBUG',
'handlers': ['console'],
But only if you find those useful :)
These do indeed look useful! I'll add them.
@jezdez -- would you mind sanity checking this simple set of fixes when you have a moment?