From ee2c4fdd1a23358a4aa29459ba5d8adca7ff9ba6 Mon Sep 17 00:00:00 2001 From: lardbit Date: Wed, 10 Apr 2024 11:56:08 -0500 Subject: [PATCH] run celery scheduler (beat) separately so concurrency doesn't create duplicate tasks, decrease logging sizes --- entrypoint-celery.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/entrypoint-celery.sh b/entrypoint-celery.sh index 766dde39..5d007246 100755 --- a/entrypoint-celery.sh +++ b/entrypoint-celery.sh @@ -14,7 +14,8 @@ if [ ! -z $CELERY_BEAT_SEPARATELY ]; then else su $(id -un ${RUN_AS_UID}) -c "/env/bin/celery -A nefarious worker --concurrency ${NUM_CELERY_WORKERS:-0} --loglevel=INFO" fi -# run celery worker & scheduler at the same time, with single concurrency +# run celery worker & scheduler at the same time +# NOTE: this isn't advised since the scheduler could be potentially running multiple/simultaneous times creating duplicate tasks else - su $(id -un ${RUN_AS_UID}) -c "/env/bin/celery -A nefarious worker --concurrency 1 --beat --loglevel=INFO" + su $(id -un ${RUN_AS_UID}) -c "/env/bin/celery -A nefarious worker --concurrency ${NUM_CELERY_WORKERS:-0} --beat --loglevel=INFO" fi