Skip to content

Commit

Permalink
Enable celery task deduplication
Browse files Browse the repository at this point in the history
Before each task execution, instruct the worker to check if this task is a duplicate message.

Deduplication occurs only with tasks that have the same identifier, enabled late acknowledgment, were redelivered by the message broker and their state is SUCCESS in the result backend.

[CLOUDDST-19499]
  • Loading branch information
lipoja committed Aug 8, 2023
1 parent 038e18c commit 3aa2bde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions iib/workers/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ class Config(object):
temp_fbc_fragment_path = 'fbc-fragment'
# For now, only allow a single process so that all tasks are processed serially
worker_concurrency: int = 1
# Before each task execution, instruct the worker to check if this task is a duplicate message.
# Deduplication occurs only with tasks that have the same identifier,
# enabled late acknowledgment, were redelivered by the message broker
# and their state is SUCCESS in the result backend.
worker_deduplicate_successful_tasks: bool = True
# Don't allow the worker to fetch more messages than it can handle at a time. This is so that
# other tasks aren't starved. This will only be useful once more workers are enabled.
worker_prefetch_multiplier: int = 1
Expand Down

0 comments on commit 3aa2bde

Please sign in to comment.