-
Notifications
You must be signed in to change notification settings - Fork 473
fix: simplify task fetching by removing crontab exclusion #956 #961
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
Removed crontab exclusion logic from task fetching. Filters were created to limit window to +/-2 hours for crontab, but tasks are never refetched - must either implement refetching protocol or (as implemented here) remove the filter entirely.
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.
can not verify this as there is no appropriate test cases. and the CI is failing. i think it would be better to implement improved protocol
@auvipy / @alirafiei75 any suggestions on how/when the tasks should be getting refetched/parsed from the DB? The code obviously expected this behavior, but it is not happening. I'm also curious if there are other tests that we expected to cover this code originally? |
I think that mechanism with sliding window is not bad, we just need to force this sliding every hour or less. django-celery-beat/django_celery_beat/schedulers.py Lines 519 to 531 in 6427286
|
|
but we need a proper solution with appropriate tests |
|
That 5 minute force refresh is not happening for crontab. Some code runs, but the reload never rereads/refreshes from the database. This code you are referring to as the fix has been there since before v2.8.1 and the issue presents in v2.8.1: As @auvipy has indicated, I think testing (if representative of client crontab use case) will be quite revealing. |
|
@ncimino @auvipy I would say that on 2.8.1 its not an issue anymore - just look at my logs - I showed that its work here #956 (comment) so sliding window works (at least with celery 5.5.3), you can see how it forces reload crontab schedules every 300sec and it works as well, my tasks those were planned out of sliding window, finally loaded in memory when window overlaps it, so I can see crontab tasks in my schedule in (-2 +2h) period. Looks good. |
thanks for verifying |
Removed crontab exclusion logic from task fetching. Filters were created to limit window to +/-2 hours for crontab, but tasks are never refetched - must either implement refetching protocol or (as implemented here) remove the filter entirely.