-
-
Notifications
You must be signed in to change notification settings - Fork 972
Support redis queue expiration #2251
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2251 +/- ##
==========================================
+ Coverage 81.55% 81.57% +0.02%
==========================================
Files 77 77
Lines 9541 9565 +24
Branches 1162 1165 +3
==========================================
+ Hits 7781 7803 +22
- Misses 1568 1569 +1
- Partials 192 193 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Nusnus
left a comment
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.
You can run tox -e lint locally to check the lint errors instead of waiting for the CI
|
@Nusnus would appreciate feedback and guideline on the further actions. Should I cover by unit tests the code additionally? Since it seems covered in integration tests but codecov is not aware of those |
I will need to properly review this change which might take some time (days to week or two). In the meantime, and until I'll add it to Kombu's CI later this year, you can check manually if the entire test suits of Celery are passing with a patched Kombu running this change. Unit, integration and smoke tests. You don't need to add any new test, just make sure nothing is broken due to the changes of this PR. Let me know if you need any assistance running the CI locally or configuring tox for your patched Kombu. TL;DR remove Kombu from all req.txt files in Celery and add to the |
|
@Nusnus I was able to run Celery test suite for python3.9 and it's looking good. I'm actually not exactly sure that my local Kombu version was used for that (but the -e statement was visible during pip install, so my assumption that it went well), but I indeed followed your guide (removing from req Kombu and adding -e local/path to deps of tox.ini). Please, let me know if any further actions are required from my side. Thanks
|
|
this is slated for kombu 5.6 so wait a little bit, we are in the middle of finaliizing v5.5 release |
yes, I need your help, it would be great if you can re check and make the CI green again. thanks for your patience. |
|
should be good now, please approve workflows @auvipy |
auvipy
left a comment
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.
sadly the integration tests are also failing now! may be they also need some adjustment?
|
@auvipy has to be fixed now 🙂 are there any updates regarding 5.7.0? |
I can merge it by the end of may, but a release need some more qualified PR's to be merged by then. you can still use it from github |
|
Hey @auvipy are we still on track for the end of May? |
Basically yeah, I'm planning on finalizing the last issues by then and dedicate the last week of May for the next release, so we'll be able to move forward with this change as well 🙏 EDIT: |
there is no need for rushing for this pr. as this is planned for v5.7 it will be for sure. just we are ironing down new bugs popping up from the new release. so no worries. |
Apologies on the delays, I'm preparing something big for the community so my capacity is a bit low these weeks. TL;DR Our general priorities are:
With an emphasis on small iterative releases, to avoid collecting technical debt from our latest updates. |
this should be self explanatory. we got another intermediatary release of v5.6, after that we are all n for 5.7... and this is on the review q.... |


Redis Queue Expiration Feature
Description
This PR adds support for automatically expiring Redis queues after a period of inactivity. This is particularly useful for managing ephemeral queues that should be automatically cleaned up when they're no longer being used.
The implementation adds the following capabilities:
x-expiresqueue argument for Redis transport, specifying milliseconds after which an inactive queue is deletedexpiresparameter onQueueobjects (in seconds) which is translated tox-expiresinternallyImplementation
The implementation adds two key methods to the Redis transport Channel class:
_maybe_update_queues_expire: Updates TTL on queue keys when there is activity_get_queue_expire: Extracts the expiration time from queue argumentsThese methods ensure that Redis queue keys have TTL set appropriately based on the queue definition, and that the TTL gets refreshed on both get and put operations.
Testing
Added comprehensive integration tests that verify:
Documentation
Added documentation of the
x-expiresoption to the module docstring in the Transport Options section.Usage Example