Skip to content

Commit

Permalink
Addressed comments: Added sample config in the docs as well as refere…
Browse files Browse the repository at this point in the history
…nce link for all the celery configs.
  • Loading branch information
sachin-arora-cashfree authored and arorasachin9 committed Dec 22, 2024
1 parent e27c277 commit f9a05ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion providers/src/airflow/providers/celery/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ config:
default: "False"
extra_celery_config:
description: |
Extra celery configs to include in the celery worker
Extra celery configs to include in the celery worker. Any of the celery config can be added to this config and it will be applied while starting the celery worker. e.g. {"worker_max_tasks_per_child": 10}
See also:
https://docs.celeryq.dev/en/stable/userguide/configuration.html#configuration-and-defaults
version_added: ~
type: string
example: ~
Expand Down
4 changes: 1 addition & 3 deletions providers/tests/celery/executors/test_celery_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,4 @@ def test_celery_extra_celery_config_loaded_from_string():

# reload celery conf to apply the new config
importlib.reload(default_celery)
assert default_celery.DEFAULT_CELERY_CONFIG["extra_celery_config"] == {
"worker_max_tasks_per_child": 10
}
assert default_celery.DEFAULT_CELERY_CONFIG["extra_celery_config"] == {"worker_max_tasks_per_child": 10}

0 comments on commit f9a05ce

Please sign in to comment.