Skip to content

Commit 30cb1e6

Browse files
committed
update celery queue settings
1 parent f76d9d4 commit 30cb1e6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/nefarious/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@
178178
# nefarious (celery) will actually use the INTERNAL_DOWNLOAD_PATH (container specific path) to scan for imported media
179179
HOST_DOWNLOAD_PATH = os.environ.get('HOST_DOWNLOAD_PATH', INTERNAL_DOWNLOAD_PATH if DEBUG else None)
180180

181+
# the number of tasks a worker process will reserve at a time.
182+
CELERY_WORKER_PREFETCH_MULTIPLIER = 1
183+
# this ensures the task is acknowledged AFTER it runs, not before.
184+
CELERY_TASK_ACKS_LATE = True
185+
181186
CONFIG_PATH = os.environ.get('CONFIG_PATH', '/nefarious-db')
182187

183188
# log to shared config path when using default container configuration, otherwise fallback to /tmp

0 commit comments

Comments
 (0)