-
Notifications
You must be signed in to change notification settings - Fork 464
Set options['expire_seconds'] from model.expire_seconds #564
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
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.
whats problem will this change solve? can you add test to verify this?
@954-Ivory can you verify this patch? |
Do not approved this PR. django-celery-beat/django_celery_beat/models.py Lines 599 to 600 in 626c2a0
django-celery-beat/django_celery_beat/models.py Lines 592 to 596 in 626c2a0
|
I went to test just now, |
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.
need regression test to verify this
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.
Pull Request Overview
This PR adds support for reading an expire_seconds
attribute from the schedule model and including it in the task options sent to the broker.
- Adds a conditional to map
model.expire_seconds
intoself.options
- Preserves existing handling of the older
expires_
attribute
Comments suppressed due to low confidence (1)
django_celery_beat/schedulers.py:80
- Celery recognizes an
expires
option (accepting an int for seconds) rather thanexpire_seconds
. Consider usingself.options['expires'] = model.expire_seconds
or verify that your broker supports theexpire_seconds
key.
self.options['expire_seconds'] = model.expire_seconds
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #564 +/- ##
=======================================
Coverage ? 88.21%
=======================================
Files ? 32
Lines ? 1010
Branches ? 106
=======================================
Hits ? 891
Misses ? 101
Partials ? 18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.