Skip to content

Commit d295a18

Browse files
authored
[Fixes #14291] Add parameter for beat DB file location (#14292)
* Add parameter for beat DB file location * Cleaner location for BEAT_DB (review comment from Gpetrak)
1 parent c9ef9d1 commit d295a18

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

celery-cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ CELERY__WORKER_CONCURRENCY=${CELERY__WORKER_CONCURRENCY:-"4"}
1616

1717
# Celery beat settings
1818
CELERY__BEAT_SCHEDULE=${CELERY__BEAT_SCHEDULE:-"celery.beat:PersistentScheduler"}
19+
CELERY__BEAT_DB=${CELERY__BEAT_DB:-"/mnt/volumes/statics/celerybeat-schedule"}
1920
CELERY__BEAT_LOG=${CELERY__BEAT_LOG:-"/var/log/celery_beat.log"}
2021

2122
# Harvester settings
@@ -43,6 +44,7 @@ fi
4344

4445
echo "Starting Celery Beat..."
4546
$CELERY_BIN -A $CELERY_APP beat --scheduler=$CELERY__BEAT_SCHEDULE \
47+
--schedule=$CELERY__BEAT_DB \
4648
--loglevel=$CELERY__LOG_LEVEL -f $CELERY__BEAT_LOG --pidfile=/tmp/celerybeat.pid &
4749

4850
echo "Starting Default Celery Worker..."
@@ -67,4 +69,4 @@ wait -n
6769

6870
# Exit with the status of the process that exited first
6971
# Docker will restart the container if this is non-zero (i.e., a failure)
70-
exit $?
72+
exit $?

0 commit comments

Comments
 (0)