-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add a comment clarifying the purpose of the `broker_transport_options` that we use (`max_retries`, `interval_start`, and `interval_step`) 2. Remove the `interval_max` option because this isn't necessary and has no effect when `max_retries` is used 3. Don't use `RETRY_POLICY_QUICK` when passing `broker_transport_options`: it is the same dict of options but broker transport options aren't the same thing as a retry policy, I think for clarity it's best not to confuse the two 4. Remove `task_acks_late=True`, use early-acknowledgement by default (Celery's default behvaviour). I've added `acks_late=True` to the tasks that I think should be using late-acknowledgement. This does mean that this commit changes some tasks from late- to early-acknowledgement when I judged that early-acknowledgement was acceptable for these tasks. 5. Remove `accept_content=["json"]`: this is the default value (see: https://docs.celeryq.dev/en/stable/userguide/configuration.html#accept-content) 6. Remove `task_ignore_result=True`: I don't think this does anything since we don't have a results backend configured 7. Remove `task_serializer="json"`: this is the default value (see: https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-task_serializer) 8. Remove `worker_prefetch_multiplier=1`. This defaults to `4` which the Celery docs say is usually a good choice unless you have very long-running tasks (which we don't). I don't see any reason why we should change this from the default and the comment says that we set it to `1` just because it matches the behaviour of NSQ (which we used before Celery) which doesn't seem like a good reason. See: https://docs.celeryq.dev/en/stable/userguide/configuration.html#std-setting-worker_prefetch_multiplier
- Loading branch information
Showing
5 changed files
with
31 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters