-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add configuration setting for number of octopoes workers #3796
Conversation
This needs docs changes, and possibly a backward compatible solution for those who already set the celery env-var |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this works, I think documenting or referencing the CELERY_WORKER_CONCURRENCY
variable would've been easier. Because now we have an extra setting, possibly backwards compatibility issues and settings inconsistency (e.g. you can set other Celery settings, but for CELERY_WORKER_CONCURRENCY
you'd now have to use OCTOPOES_WORKERS
, which may be confusing for users who have Celery experience).
The last two can probably be solved using field aliases, something like:
workers: int = Field(4, description="Number of Octopoes Celery workers", alias=["OCTOPOES_WORKERS", "CELERY_WORKER_CONCURRENCY"])
(not tested, and note the extra OCTOPOES_
prefix, because env_prefix
does not apply to fields with aliases)
I don't have a strong preference, but just giving another perspective
Checklist for QA:
What works:Works, number of celery workers went from 4 to 6. Onboarding flow still works as expected. What doesn't work:n/a Bug or feature?:n/a |
This still needs documentation. |
The documentation of settings is auto generated, so should be online as soon we merge this. We could mention in the release notes when we write those. |
Quality Gate passedIssues Measures |
* main: (60 commits) Increase max number of PostgreSQL connections (#3889) Fix for task id as valid UUID (#3744) Add `auto_calculate_deadline` attribute to Scheduler (#3869) Ignore specific url parameters when following location headers (#3856) Let mailserver inherit l1 (#3704) Change plugins enabling in report flow to checkboxes (#3747) Fix rocky katalogus tests and delete unused fixtures (#3884) Enable/disable scheduled reports (#3871) optimize locking in katalogus.py, reuse available data (#3752) Updates boefje clearances and descriptions (#3863) Fixes for empty tables (#3844) Fix cron for last day of the month (#3831) Sub reports for Aggregate Report (#3852) Add start time to scheduled reports (#3809) Add configuration setting for number of octopoes workers (#3796) Limit requesting prior tasks for ranking in scheduler (#3836) Let local plugins (files) take precedence over database entries (#3858) Skip empty queues in the Rocky worker (#3860) Report types listed in a modal @ report plugins (#3718) Support a Schedule without a schedule in scheduler (#3834) ...
Changes
This adds a setting to octopoes to configure the number of workers. While it is possible to do this directly in celery with
CELERY_WORKER_CONCURRENCY
, this value does not have a proper default and it not in our documentation. With this change we add a default and it will also automatically be included in the documentation.This also removes
CELERY_WORKER_CONCURRENCY
from.env-dist
because the default is 4 now and so we don't need this anymore.QA notes
Check if setting
OCTOPOES_WORKERS
changes the number of octopoes celery processes that are started.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.