Releases: celery/celery
v5.5.0rc4
Celery v5.5.0 Release Candidate 4 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
See What’s new in Celery 5.5 (Immunity) or read the main highlights below.
Using Kombu 5.5.0rc2
The minimum required Kombu version has been bumped to 5.5.0.
Kombu is current at 5.5.0rc2.
Complete Quorum Queues Support
A completely new ETA mechanism was developed to allow full support with RabbitMQ Quorum Queues.
After upgrading to this version, please share your feedback on the quorum queues support.
- New documentation.
- New broker_native_delayed_delivery_queue_type configuration option.
New support for Google Pub/Sub transport
After upgrading to this version, please share your feedback on the Google Pub/Sub transport support.
Relevant Issues: #9351
Python 3.13 Improved Support
Additional dependencies have been migrated successfully to Python 3.13, including Kombu and py-amqp.
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Bugfix: SIGQUIT not initiating cold shutdown when
task_acks_late=False
by @Nusnus in #9461 - Fixed pycurl dep with Python 3.8 by @Nusnus in #9471
- Update elasticsearch requirement from <=8.16.0 to <=8.17.0 by @dependabot in #9469
- Bump pytest-subtests from 0.13.1 to 0.14.1 by @dependabot in #9459
- documentation: Added a type annotation to the periodic task example by @Avamander in #9473
- Prepare for (pre) release: v5.5.0rc4 by @Nusnus in #9474
New Contributors
- @Avamander made their first contribution in #9473
Full Changelog: v5.5.0rc3...v5.5.0rc4
v5.5.0rc3
Celery v5.5.0 Release Candidate 3 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
See What’s new in Celery 5.5 (Immunity) or read the main highlights below.
Using Kombu 5.5.0rc2
The minimum required Kombu version has been bumped to 5.5.0.
Kombu is current at 5.5.0rc2.
Complete Quorum Queues Support
A completely new ETA mechanism was developed to allow full support with RabbitMQ Quorum Queues.
After upgrading to this version, please share your feedback on the quorum queues support.
- New documentation.
- New broker_native_delayed_delivery_queue_type configuration option.
New support for Google Pub/Sub transport
After upgrading to this version, please share your feedback on the Google Pub/Sub transport support.
Relevant Issues: #9351
Python 3.13 Improved Support
Additional dependencies have been migrated successfully to Python 3.13, including Kombu and py-amqp.
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Document usage of broker_native_delayed_delivery_queue_type by @thedrow in #9419
- Adjust section in what's new document regarding quorum queues support by @thedrow in #9420
- Update pytest-rerunfailures to 15.0 by @pyup-bot in #9422
- Document group unrolling by @thedrow in #9421
- fix small typo acces -> access by @sharuzzaman in #9434
- Update cryptography to 44.0.0 by @pyup-bot in #9437
- Added pypy to Dockerfile by @Nusnus in #9438
- Skipped flaky tests on pypy (all pass after ~10 reruns) by @Nusnus in #9439
- Allowing managed credentials for azureblockblob by @PieterBlomme in #9430
- Allow passing Celery objects to the Click entry point by @0x2b3bfa0 in #9426
- support Request termination for gevent by @woutdenolf in #9440
- Prevent event_mask from being overwritten. by @Androidown in #9432
- Update pytest to 8.3.4 by @pyup-bot in #9444
- Prepare for (pre) release: v5.5.0rc3 by @Nusnus in #9450
New Contributors
- @sharuzzaman made their first contribution in #9434
- @PieterBlomme made their first contribution in #9430
Full Changelog: v5.5.0rc2...v5.5.0rc3
v5.5.0rc2
Celery v5.5.0 Release Candidate 2 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
See What’s new in Celery 5.5 (Immunity) or read the main highlights below.
Using Kombu 5.5.0rc2
The minimum required Kombu version has been bumped to 5.5.0.
Kombu is current at 5.5.0rc2.
Complete Quorum Queues Support
A completely new ETA mechanism was developed to allow full support with RabbitMQ Quorum Queues.
After upgrading to this version, please share your feedback on the quorum queues support.
- New documentation.
- New broker_native_delayed_delivery_queue_type configuration option.
New support for Google Pub/Sub transport
After upgrading to this version, please share your feedback on the Google Pub/Sub transport support.
Relevant Issues: #9351
Python 3.13 Improved Support
Additional dependencies have been migrated successfully to Python 3.13, including Kombu and py-amqp.
Previous Pre-release Highlights
Python 3.13 Initial Support
This release introduces the initial support for Python 3.13 with Celery.
After upgrading to this version, please share your feedback on the Python 3.13 support.
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Fix: Treat dbm.error as a corrupted schedule file by @stumpylog in #9331
- Pin pre-commit to latest version 4.0.1 by @pyup-bot in #9343
- Added Python 3.13 to Dockerfiles by @Nusnus in #9350
- Skip test_pool_restart_import_modules on PyPy due to test issue by @Nusnus in #9352
- Update elastic-transport requirement from <=8.15.0 to <=8.15.1 by @dependabot in #9347
- added dragonfly logo by @auvipy in #9353
- Update README.rst by @auvipy in #9354
- Update README.rst by @auvipy in #9355
- Update mypy to 1.12.0 by @pyup-bot in #9356
- Bump Kombu to v5.5.0rc1 by @Nusnus in #9357
- Fix
celery --loader
option parsing by @0x2b3bfa0 in #9361 - Add support for Google Pub/Sub transport by @haimjether in #9351
- Add native incr support for GCSBackend by @haimjether in #9302
- fix(perform_pending_operations): prevent task duplication on shutdown… by @moaddib666 in #9348
- Update grpcio to 1.67.0 by @pyup-bot in #9365
- Update google-cloud-firestore to 2.19.0 by @pyup-bot in #9364
- Annotate celery/utils/timer2.py by @hmnfalahi in #9362
- Update cryptography to 43.0.3 by @pyup-bot in #9366
- Update mypy to 1.12.1 by @pyup-bot in #9368
- Bump mypy from 1.12.1 to 1.13.0 by @dependabot in #9373
- Pass timeout and confirm_timeout to producer.publish() by @thedrow in #9374
- Bump Kombu to v5.5.0rc2 by @Nusnus in #9382
- Bump pytest-cov from 5.0.0 to 6.0.0 by @dependabot in #9388
- default strict to False for pydantic tasks by @mathiasertl in #9393
- Only log that global QoS is disabled if using amqp by @thedrow in #9395
- chore: update sponsorship logo by @Niennienzz in #9398
- Allow custom hostname for celery_worker in celery.contrib.pytest / celery.contrib.testing.worker by @SlowMo24 in #9405
- Removed docker-docs from CI (optional job, malfunctioning) by @Nusnus in #9406
- Added a utility to format changelogs from the auto-generated GitHub release notes by @Nusnus in #9408
- Bump codecov/codecov-action from 4 to 5 by @dependabot in #9412
- Update elasticsearch requirement from <=8.15.1 to <=8.16.0 by @dependabot in #9410
- Native Delayed Delivery in RabbitMQ by @thedrow in #9207
- Prepare for (pre) release: v5.5.0rc2 by @Nusnus in #9416
New Contributors
- @0x2b3bfa0 made their first contribution in #9361
- @hmnfalahi made their first contribution in #9362
- @Niennienzz made their first contribution in #9398
- @SlowMo24 made their first contribution in #9405
Full Changelog: v5.5.0rc1...v5.5.0rc2
v5.5.0rc1
Celery v5.5.0 Release Candidate 1 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
See What’s new in Celery 5.5 (Immunity) or read the main highlights below.
Python 3.13 Initial Support
This release introduces the initial support for Python 3.13 with Celery.
After upgrading to this version, please share your feedback on the Python 3.13 support.
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Added Blacksmith.sh to the Sponsors section in the README by @Nusnus in #9323
- Revert "Added Blacksmith.sh to the Sponsors section in the README" by @Nusnus in #9324
- Added Blacksmith.sh to the Sponsors section in the README by @Nusnus in #9325
- Added missing " |oc-sponsor-3|” in README by @Nusnus in #9326
- Use Blacksmith SVG logo by @Nusnus in #9327
- Updated Blacksmith SVG logo by @Nusnus in #9328
- Revert "Updated Blacksmith SVG logo" by @Nusnus in #9329
- Update pymongo to 4.10.0 by @pyup-bot in #9330
- Update pymongo to 4.10.1 by @pyup-bot in #9332
- Update user guide to recommend delay_on_commit by @browniebroke in #9333
- Pin pre-commit to latest version 4.0.0 (Python 3.9+) by @pyup-bot in #9334
- Update ephem to 4.1.6 by @pyup-bot in #9336
- Updated Blacksmith SVG logo by @Nusnus in #9337
- Prepare for (pre) release: v5.5.0rc1 by @Nusnus in #9341
Full Changelog: v5.5.0b4...v5.5.0rc1
v5.5.0b4
Celery v5.5.0 Beta 4 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
Python 3.13 Initial Support
This release introduces the initial support for Python 3.13 with Celery.
After upgrading to this version, please share your feedback on the Python 3.13 support.
Previous Pre-release Highlights
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Correct the error description in exception message when validate soft_time_limit by @narasux in #9246
- Update msgpack to 1.1.0 by @pyup-bot in #9249
- chore(utils/time.py): rename
_is_ambigious
->_is_ambiguous
by @pachewise in #9248 - Reduced Smoke Tests to min/max supported python (3.8/3.12) by @Nusnus in #9252
- Update pytest to 8.3.3 by @pyup-bot in #9253
- Update elasticsearch requirement from <=8.15.0 to <=8.15.1 by @dependabot in #9255
- update mongodb without deprecated
[srv]
extra requirement by @fmigneault in #9258 - blacksmith.sh: Migrate workflows to Blacksmith by @blacksmith-sh in #9261
- Fixes #9119: inject dispatch_uid for retry-wrapped receivers by @pachewise in #9247
- Run all smoke tests CI jobs together by @Nusnus in #9263
- Improve documentation on visibility timeout by @kylez-ithaka in #9264
- Bump pytest-celery to 1.1.2 by @Nusnus in #9267
- Added missing "app.conf.visibility_timeout" in smoke tests by @Nusnus in #9266
- Improved stability with t/smoke/tests/test_consumer.py by @Nusnus in #9268
- Improved Redis container stability in the smoke tests by @Nusnus in #9271
- Disabled EXHAUST_MEMORY tests in Smoke-tasks by @Nusnus in #9272
- Marked xfail for test_reducing_prefetch_count with Redis - flaky test by @Nusnus in #9273
- Fixed pypy unit tests random failures in the CI by @Nusnus in #9275
- Fixed more pypy unit tests random failures in the CI by @Nusnus in #9278
- Fix Redis container from aborting randomly by @Nusnus in #9276
- Run Integration & Smoke CI tests together after unit tests passes by @Nusnus in #9280
- Added "loglevel verbose" to Redis containers in smoke tests by @Nusnus in #9282
- Fixed Redis error in the smoke tests: "Possible SECURITY ATTACK detected" by @Nusnus in #9284
- Refactored the smoke tests github workflow by @Nusnus in #9285
- Increased --reruns 3->4 in smoke tests by @Nusnus in #9286
- Improve stability of smoke tests (CI and Local) by @Nusnus in #9287
- Fixed Smoke tests CI "test-case" lables (specific instead of general) by @Nusnus in #9288
- Use assert_log_exists instead of wait_for_log in worker smoke tests by @Nusnus in #9290
- Optimized t/smoke/tests/test_worker.py by @Nusnus in #9291
- Enable smoke tests dockers check before each test starts by @Nusnus in #9292
- Relaxed smoke tests flaky tests mechanism by @Nusnus in #9293
- Updated quorum queue detection to handle multiple broker instances by @bkienker in #9294
- Non-lazy table creation for database backend by @MarcBresson in #9228
- Pin pymongo to latest version 4.9 by @pyup-bot in #9297
- Bump pymongo from 4.9 to 4.9.1 by @dependabot in #9298
- Bump Kombu to v5.4.2 by @Nusnus in #9304
- Use rabbitmq:3 in stamping smoke tests by @Nusnus in #9307
- Bump pytest-celery to 1.1.3 by @Nusnus in #9308
- Added Python 3.13 Support by @Nusnus in #9309
- Add log when global qos is disabled by @thedrow in #9296
- Added official release docs (whatsnew) for v5.5 by @Nusnus in #9312
- Enable Codespell autofix by @Nusnus in #9313
- Pydantic typehints: Fix optional, allow generics by @mathiasertl in #9319
- Prepare for (pre) release: v5.5.0b4 by @Nusnus in #9322
New Contributors
- @narasux made their first contribution in #9246
- @fmigneault made their first contribution in #9258
- @blacksmith-sh made their first contribution in #9261
- @kylez-ithaka made their first contribution in #9264
- @bkienker made their first contribution in #9294
- @MarcBresson made their first contribution in #9228
Full Changelog: v5.5.0b3...v5.5.0b4
v5.5.0b3
Celery v5.5.0 Beta 3 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
Soft Shutdown
The soft shutdown is a new mechanism in Celery that sits between the warm shutdown and the cold shutdown. It sets a time limited "warm shutdown" period, during which the worker will continue to process tasks that are already running. After the soft shutdown ends, the worker will initiate a graceful cold shutdown, stopping all tasks and exiting.
The soft shutdown is disabled by default, and can be enabled by setting the new configuration option worker_soft_shutdown_timeout. If a worker is not running any task when the soft shutdown initiates, it will skip the warm shutdown period and proceed directly to the cold shutdown unless the new configuration option worker_enable_soft_shutdown_on_idle is set to True. This is useful for workers that are idle, waiting on ETA tasks to be executed that still want to enable the soft shutdown anyways.
The soft shutdown can replace the cold shutdown when using a broker with a visibility timeout mechanism, like Redis or SQS, to enable a more graceful cold shutdown procedure, allowing the worker enough time to re-queue tasks that were not completed (e.g., Restoring 1 unacknowledged message(s)
) by resetting the visibility timeout of the unacknowledged messages just before the worker exits completely.
After upgrading to this version, please share your feedback on the new Soft Shutdown mechanism.
Relevant Issues: #9213, #9231, #9238
- New documentation for each shutdown type.
- New worker_soft_shutdown_timeout configuration option.
- New worker_enable_soft_shutdown_on_idle configuration option.
REMAP_SIGTERM
The REMAP_SIGTERM
"hidden feature" has been tested, documented and is now officially supported.
This feature allows users to remap the SIGTERM signal to SIGQUIT, to initiate a soft or a cold shutdown using TERM
instead of QUIT.
Previous Pre-release Highlights
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Added SQS (localstack) broker to canvas smoke tests by @Nusnus in #9179
- Pin elastic-transport to <= latest version 8.15.0 by @pyup-bot in #9182
- Update elasticsearch requirement from <=8.14.0 to <=8.15.0 by @dependabot in #9186
- improve formatting by @Bonifacio2 in #9188
- Add basic helm chart for celery by @necromancerthedark in #9181
- Update kafka.rst by @lokot0k in #9194
- Update pytest-order to 1.3.0 by @pyup-bot in #9198
- Update mypy to 1.11.2 by @pyup-bot in #9206
- all added to routes by @dhruvji in #9204
- Fix typos discovered by codespell by @cclauss in #9212
- Use tzdata extras with zoneinfo backports by @auvipy in #8286
- Use
docker compose
in Contributing's doc build section by @KeisukeYamashita in #9219 - Failing test for issue #9119 by @mgedmin in #9215
- Fix date_done timezone issue by @FKgk in #8385
- CI Fixes to smoke tests by @Nusnus in #9223
- fix: passes current request context when pushing to request_stack by @nikatlas in #9208
- Fix broken link in the Using RabbitMQ docs page by @thedrow in #9226
- Added Soft Shutdown Mechanism by @Nusnus in #9213
- Added worker_enable_soft_shutdown_on_idle by @Nusnus in #9231
- Bump cryptography from 43.0.0 to 43.0.1 by @dependabot in #9233
- Added docs regarding the relevancy of soft shutdown and ETA tasks by @Nusnus in #9238
- Show broker_connection_retry_on_startup warning only if it evaluates as False by @serl in #9227
- Fixed docker-docs CI failure by @Nusnus in #9240
- Added docker cleanup auto-fixture to improve smoke tests stability by @Nusnus in #9243
- print is not thread-safe, so should not be used in signal handler by @Zhong-z in #9222
- Prepare for (pre) release: v5.5.0b3 by @Nusnus in #9244
New Contributors
- @Bonifacio2 made their first contribution in #9188
- @necromancerthedark made their first contribution in #9181
- @lokot0k made their first contribution in #9194
- @dhruvji made their first contribution in #9204
- @KeisukeYamashita made their first contribution in #9219
- @mgedmin made their first contribution in #9215
- @FKgk made their first contribution in #8385
- @nikatlas made their first contribution in #9208
- @serl made their first contribution in #9227
Full Changelog: v5.5.0b2...v5.5.0b3
v5.5.0b2
Celery v5.5.0 Beta 2 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
Pydantic Support
This release introduces support for Pydantic models in Celery tasks.
For more info, see the new pydantic example and PR #9023 by @mathiasertl.
After upgrading to this version, please share your feedback on the new Pydantic support.
Previous Beta Highlights
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the v5.4.0 release of Kombu, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- Bump pytest from 8.3.1 to 8.3.2 by @dependabot in #9153
- Remove setuptools deprecated test command from setup.py by @sevdog in #9159
- Pin pre-commit to latest version 3.8.0 from Python 3.9 by @pyup-bot in #9156
- Bump mypy from 1.11.0 to 1.11.1 by @dependabot in #9164
- Change "docker-compose" to "docker compose" in Makefile by @Nusnus in #9169
- update python versions and docker compose by @mathiasertl in #9171
- Add support for Pydantic model validation/serialization (fixes #8751) by @mathiasertl in #9023
- Allow local dynamodb to be installed on another host than localhost by @peerjakobsen in #8965
- Terminate job implementation for gevent concurrency backend by @ldsink in #9083
- Bump Kombu to v5.4.0 by @Nusnus in #9177
- Add check for soft_time_limit and time_limit values by @ashm-dev in #9173
- Prepare for (pre) release: v5.5.0b2 by @Nusnus in #9178
New Contributors
- @sevdog made their first contribution in #9159
- @peerjakobsen made their first contribution in #8965
- @ldsink made their first contribution in #9083
- @ashm-dev made their first contribution in #9173
Full Changelog: v5.5.0b1...v5.5.0b2
v5.5.0b1
Celery v5.5.0 Beta 1 is now available for testing.
Please help us test this version and report any issues.
Key Highlights
Redis Broker Stability Improvements
The root cause of the Redis broker instability issue has been identified and resolved in the release-candidate for Kombu v5.4.0. This beta release has been upgraded to use the new Kombu RC version, which should resolve the disconnections bug and offer additional improvements.
After upgrading to this version, please share your feedback on the Redis broker stability.
Relevant Issues: #7276, #8091, #8030, #8384
Quorum Queues Initial Support
This release introduces the initial support for Quorum Queues with Celery.
See new configuration options for more details:
After upgrading to this version, please share your feedback on the Quorum Queues support.
What's Changed
- (docs): use correct version celery v.5.4.x by @FraCata00 in #8975
- Update mypy to 1.10.0 by @pyup-bot in #8977
- Limit pymongo<4.7 when Python <= 3.10 due to breaking changes in 4.7 by @Nusnus in #8988
- Bump pytest from 8.1.1 to 8.2.0 by @dependabot in #8987
- Update README to Include FastAPI in Framework Integration Section by @pedroimpulcetto in #8978
- Clarify return values of ..._on_commit methods by @browniebroke in #8984
- add kafka broker docs by @thuibr in #8935
- Limit pymongo<4.7 regardless of Python version by @Nusnus in #8999
- Update pymongo[srv] requirement from <4.7,>=4.0.2 to >=4.0.2,<4.8 by @dependabot in #9000
- Update elasticsearch requirement from <=8.13.0 to <=8.13.1 by @dependabot in #9004
- security: SecureSerializer: support generic low-level serializers by @shirsa in #8982
- don't kill if pid same as file (#8997) by @lewijw in #8998
- Update cryptography to 42.0.6 by @pyup-bot in #9005
- Bump cryptography from 42.0.6 to 42.0.7 by @dependabot in #9009
- don't kill if pid same as file (#8997) (#8998) by @lewijw in #9007
- Added -vv to unit, integration and smoke tests by @Nusnus in #9014
- SecuritySerializer: ensure pack separator will not be conflicted with serialized fields by @shirsa in #9010
- Update sphinx-click to 5.2.2 by @pyup-bot in #9025
- Bump sphinx-click from 5.2.2 to 6.0.0 by @dependabot in #9029
- Fix a typo to display the help message in first-steps-with-django by @ppawlak in #9036
- Pinned requests to v2.31.0 due to docker-py bug #3256 by @Nusnus in #9039
- Fix certificate validity check by @SPKorhonen in #9037
- Revert "Pinned requests to v2.31.0 due to docker-py bug #3256" by @Nusnus in #9043
- Bump pytest from 8.2.0 to 8.2.1 by @dependabot in #9035
- Update elasticsearch requirement from <=8.13.1 to <=8.13.2 by @dependabot in #9045
- Fix detection of custom task set as class attribute with Django by @browniebroke in #9038
- Update elastic-transport requirement from <=8.13.0 to <=8.13.1 by @dependabot in #9050
- Bump pycouchdb from 1.14.2 to 1.16.0 by @dependabot in #9052
- Update pytest to 8.2.2 by @pyup-bot in #9060
- Bump cryptography from 42.0.7 to 42.0.8 by @dependabot in #9061
- Update elasticsearch requirement from <=8.13.2 to <=8.14.0 by @dependabot in #9069
- [enhance feature] Crontab schedule: allow using month names by @farahats9 in #9068
- Enhance tox environment: [testenv:clean] by @Nusnus in #9072
- Clarify docs about Reserve one task at a time by @quique0194 in #9073
- GCS docs fixes by @benglewis in #9075
- Use hub.remove_writer instead of hub.remove for write fds (#4185) by @IdanHaim in #9055
- Class method to process crontab string by @jayeff in #9079
- Fixed smoke tests env bug when using integration tasks that rely on Redis by @Nusnus in #9090
- Bugfix - a task will run multiple times when chaining chains with groups by @DorSSS in #9021
- Bump mypy from 1.10.0 to 1.10.1 by @dependabot in #9096
- Don't add a separator to global_keyprefix if it already has one by @naktinis in #9080
- Update pymongo[srv] requirement from <4.8,>=4.0.2 to >=4.0.2,<4.9 by @dependabot in #9111
- Added missing import in examples for Django by @giovanni1106 in #9099
- Bump Kombu to v5.4.0rc1 by @Nusnus in #9117
- Removed skipping Redis in t/smoke/tests/test_consumer.py tests by @Nusnus in #9118
- Update pytest-subtests to 0.13.0 by @pyup-bot in #9120
- Increased smoke tests CI timeout by @Nusnus in #9122
- Bump Kombu to v5.4.0rc2 by @Nusnus in #9127
- Update zstandard to 0.23.0 by @pyup-bot in #9129
- Update pytest-subtests to 0.13.1 by @pyup-bot in #9130
- Changed retry to tenacity in smoke tests by @Nusnus in #9133
- Bump mypy from 1.10.1 to 1.11.0 by @dependabot in #9135
- Update cryptography to 43.0.0 by @pyup-bot in #9138
- Update pytest to 8.3.1 by @pyup-bot in #9137
- Added support for Quorum Queues by @Nusnus in #9121
- Bump Kombu to v5.4.0rc3 by @Nusnus in #9139
- Cleanup in Changelog.rst by @Nusnus in #9141
- Update Django docs for CELERY_CACHE_BACKEND by @tylerlwsmith in #9143
- Added missing docs to previous releases by @Nusnus in #9144
- Fixed a few documentation build warnings by @Nusnus in #9145
- docs(README): link invalid by @MerleLiuKun in #9148
- Prepare for (pre) release: v5.5.0b1 by @Nusnus in #9146
New Contributors
- @FraCata00 made their first contribution in #8975
- @pedroimpulcetto made their first contribution in #8978
- @thuibr made their first contribution in #8935
- @shirsa made their first contribution in #8982
- @lewijw made their first contribution in #8998
- @ppawlak made their first contribution in #9036
- @SPKorhonen made their first contribution in #9037
- @farahats9 made their first contribution in #9068
- @quique0194 made their first contribution in #9073
- @benglewis made their first contribution in #9075
- @IdanHaim made their first contribution in #9055
- @jayeff made their first contribution in #9079
- @DorSSS made their first contribution in #9021
- @naktinis made their first contribution in #9080
- @giovanni1106 made their first contribution in #9099
- @tylerlwsmith made their first contribution in #9143
- @MerleLiuKun made their first contribution in #9148
Full Changelog: v5.4.0...v5.5.0b1
v5.4.0
Celery v5.4.0 and v5.3.x have consistently focused on enhancing the overall QA, both internally and externally.
This effort led to the new pytest-celery v1.0.0 release, developed concurrently with v5.3.0 & v5.4.0.
This release introduces two significant QA enhancements:
- Smoke Tests: A new layer of automatic tests has been added to Celery's standard CI. These tests are designed to handle production scenarios and complex conditions efficiently. While new contributions will not be halted due to the lack of smoke tests, we will request smoke tests for advanced changes where appropriate.
- Standalone Bug Report Script: The new pytest-celery plugin now allows for encapsulating a complete Celery dockerized setup within a single pytest script. Incorporating these into new bug reports will enable us to reproduce reported bugs deterministically, potentially speeding up the resolution process.
Contrary to the positive developments above, there have been numerous reports about issues with the Redis broker malfunctioning upon restarts and disconnections. Our initial attempts to resolve this were not successful (#8796).
With our enhanced QA capabilities, we are now prepared to address the core issue with Redis (as a broker) again.
The rest of the changes for this release are grouped below, with the changes from the latest release candidate listed at the end.
What's Changed
- Add a Task class specialised for Django (#8491)
- Add Google Cloud Storage (GCS) backend (#8868)
- Added documentation to the smoke tests infra (#8970)
- Added a checklist item for using pytest-celery in a bug report (#8971)
- Bugfix: Missing id on chain (#8798)
- Bugfix: Worker not consuming tasks after Redis broker restart (#8796)
- Catch UnicodeDecodeError when opening corrupt beat-schedule.db (#8806)
- chore(ci): Enhance CI with
workflow_dispatch
for targeted debugging and testing (#8826) - Doc: Enhance "Testing with Celery" section (#8955)
- Docfix: pip install celery[sqs] -> pip install "celery[sqs]" (#8829)
- Enable efficient
chord
when using dynamicdb as backend store (#8783) - feat(daemon): allows daemonization options to be fetched from app settings (#8553)
- Fix DeprecationWarning: datetime.datetime.utcnow() (#8726)
- Fix recursive result parents on group in middle of chain (#8903)
- Fix typos and grammar (#8915)
- Fixed version documentation tag from #8553 in configuration.rst (#8802)
- Hotfix: Smoke tests didn't allow customizing the worker's command arguments, now it does (#8937)
- Make custom remote control commands available in CLI (#8489)
- Print safe_say() to stdout for non-error flows (#8919)
- Support moto 5.0 (#8838)
- Update contributing guide to use ssh upstream url (#8881)
- Update optimizing.rst (#8945)
- Updated concurrency docs page. (#8753)
Dependencies Updates
- Bump actions/setup-python from 4 to 5 (#8701)
- Bump codecov/codecov-action from 3 to 4 (#8831)
- Bump isort from 5.12.0 to 5.13.2 (#8772)
- Bump msgpack from 1.0.7 to 1.0.8 (#8885)
- Bump mypy from 1.8.0 to 1.9.0 (#8898)
- Bump pre-commit to 3.6.1 (#8839)
- Bump pre-commit/action from 3.0.0 to 3.0.1 (#8835)
- Bump pytest from 8.0.2 to 8.1.1 (#8901)
- Bump pytest-celery to v1.0.0 (#8962)
- Bump pytest-cov to 5.0.0 (#8924)
- Bump pytest-order from 1.2.0 to 1.2.1 (#8941)
- Bump pytest-subtests from 0.11.0 to 0.12.1 (#8896)
- Bump pytest-timeout from 2.2.0 to 2.3.1 (#8894)
- Bump python-memcached from 1.59 to 1.61 (#8776)
- Bump sphinx-click from 4.4.0 to 5.1.0 (#8774)
- Update cryptography to 42.0.5 (#8869)
- Update elastic-transport requirement from <=8.12.0 to <=8.13.0 (#8933)
- Update elasticsearch requirement from <=8.12.1 to <=8.13.0 (#8934)
- Upgraded Sphinx from v5.3.0 to v7.x.x (#8803)
Changes since 5.4.0rc2
- Update elastic-transport requirement from <=8.12.0 to <=8.13.0 by @dependabot in #8933
- Update elasticsearch requirement from <=8.12.1 to <=8.13.0 by @dependabot in #8934
- Hotfix: Smoke tests didn't allow customizing the worker's command arguments, now it does by @Nusnus in #8937
- Bump pytest-celery to 1.0.0rc3 by @Nusnus in #8946
- Update optimizing.rst by @alexmclarty in #8945
- Doc: Enhance "Testing with Celery" section by @Nusnus in #8955
- Bump pytest-celery to v1.0.0 by @Nusnus in #8962
- Bump pytest-order from 1.2.0 to 1.2.1 by @dependabot in #8941
- Added documentation to the smoke tests infra by @Nusnus in #8970
- Added a checklist item for using pytest-celery in a bug report by @Nusnus in #8971
- Added changelog for v5.4.0 by @Nusnus in #8973
- Bump version: 5.4.0rc2 → 5.4.0 by @Nusnus in #8974
New Contributors
- @danyi1212 made their first contribution in #8690
- @Mulugruntz made their first contribution in #8696
- @Viicos made their first contribution in #8743
- @em1le made their first contribution in #8747
- @robotrapta made their first contribution in #8753
- @amweiss made their first contribution in #8791
- @andyzickler made their first contribution in #8806
- @dingxiong made their first contribution in #8783
- @Watkurem made their first contribution in #8825
- @50-Course made their first contribution in #8826
- @s-t-e-v-e-n-k made their first contribution in #8838
- @murrple-1 made their first contribution in #8841
- @hann-wang made their first contribution in #8663
- @tobinus made their first contribution in #8489
- @haimjether made their first contribution in #8868
- @hsujeremy made their first contribution in #8881
- @beneltayar made their first contribution in #8903
- @carlosp420 made their first contribution in #8915
- @lukasz-leszczuk-airspace-intelligence made their first contribution in #8919
- @alexmclarty made their first contribution in #8945
Full Changelog: v5.3.6...v5.4.0
v5.4.0rc2
What's Changed
- feat(daemon): allows daemonization options to be fetched from app settings by @noirbizarre in #8553
- Fixed version documentation tag from #8553 in configuration.rst by @Nusnus in #8802
- Upgraded Sphinx from v5.3.0 to v7.x.x by @Nusnus in #8803
- Update elasticsearch requirement from <=8.11.1 to <=8.12.0 by @dependabot in #8810
- Update elastic-transport requirement from <=8.11.0 to <=8.12.0 by @dependabot in #8811
- Update cryptography to 42.0.0 by @pyup-bot in #8814
- Catch UnicodeDecodeError when opening corrupt beat-schedule.db by @andyzickler in #8806
- Update cryptography to 42.0.1 by @pyup-bot in #8817
- Limit moto to <5.0.0 until the breaking issues are fixed by @Nusnus in #8820
- Enable efficient
chord
when using dynamicdb as backend store by @dingxiong in #8783 - Add a Task class specialised for Django by @browniebroke in #8491
- Sync kombu versions in requirements and setup.cfg by @Watkurem in #8825
- chore(ci): Enhance CI with
workflow_dispatch
for targeted debugging and testing (#8822) by @50-Course in #8826 - Update cryptography to 42.0.2 by @pyup-bot in #8827
- Docfix: pip install celery[sqs] -> pip install "celery[sqs]" by @Nusnus in #8829
- Bump pre-commit/action from 3.0.0 to 3.0.1 by @dependabot in #8835
- Support moto 5.0 by @s-t-e-v-e-n-k in #8838
- Another fix for
link_error
signatures beingdict
s instead ofSignature
s by @murrple-1 in #8841 - Bump codecov/codecov-action from 3 to 4 by @dependabot in #8831
- Upgrade from pytest-celery v1.0.0b1 -> v1.0.0b2 by @Nusnus in #8843
- Bump pytest from 7.4.4 to 8.0.0 by @dependabot in #8823
- Update pre-commit to 3.6.1 by @pyup-bot in #8839
- Update cryptography to 42.0.3 by @pyup-bot in #8854
- Bump pytest from 8.0.0 to 8.0.1 by @dependabot in #8855
- Update cryptography to 42.0.4 by @pyup-bot in #8864
- Update pytest to 8.0.2 by @pyup-bot in #8870
- Update cryptography to 42.0.5 by @pyup-bot in #8869
- Update elasticsearch requirement from <=8.12.0 to <=8.12.1 by @dependabot in #8867
- Eliminate consecutive chords generated by group | task upgrade by @hann-wang in #8663
- Make custom remote control commands available in CLI by @tobinus in #8489
- Add Google Cloud Storage (GCS) backend by @haimjether in #8868
- Bump msgpack from 1.0.7 to 1.0.8 by @dependabot in #8885
- Update pytest to 8.1.0 by @pyup-bot in #8886
- Bump pytest-timeout from 2.2.0 to 2.3.1 by @dependabot in #8894
- Bump pytest-subtests from 0.11.0 to 0.12.1 by @dependabot in #8896
- Bump mypy from 1.8.0 to 1.9.0 by @dependabot in #8898
- Update pytest to 8.1.1 by @pyup-bot in #8901
- Update contributing guide to use ssh upstream url by @hsujeremy in #8881
- Fix recursive result parents on group in middle of chain by @beneltayar in #8903
- Bump pytest-celery to 1.0.0b4 by @Nusnus in #8899
- Adjusted smoke tests CI time limit by @Nusnus in #8907
- Update pytest-rerunfailures to 14.0 by @pyup-bot in #8910
- Use the "all" extra for pytest-celery by @Nusnus in #8911
- Fix typos and grammar by @carlosp420 in #8915
- Bump pytest-celery to 1.0.0rc1 by @Nusnus in #8918
- Print safe_say() to stdout for non-error flows by @lukasz-leszczuk-airspace-intelligence in #8919
- Update pytest-cov to 5.0.0 by @pyup-bot in #8924
- Bump pytest-celery to 1.0.0rc2 by @Nusnus in #8928
- Added changelog for v5.4.0rc2 by @Nusnus in #8932
New Contributors
- @andyzickler made their first contribution in #8806
- @dingxiong made their first contribution in #8783
- @Watkurem made their first contribution in #8825
- @50-Course made their first contribution in #8826
- @s-t-e-v-e-n-k made their first contribution in #8838
- @murrple-1 made their first contribution in #8841
- @hann-wang made their first contribution in #8663
- @tobinus made their first contribution in #8489
- @haimjether made their first contribution in #8868
- @hsujeremy made their first contribution in #8881
- @beneltayar made their first contribution in #8903
- @carlosp420 made their first contribution in #8915
- @lukasz-leszczuk-airspace-intelligence made their first contribution in #8919
Full Changelog: v5.4.0rc1...v5.4.0rc2