-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix: Fix subscriptions sending twice #21581
Conversation
if "update_fields" in kwargs: | ||
kwargs["update_fields"].append("next_delivery_date") |
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.
This is now recommended to add in Django 4.2, so doing it here while on it.
Yes, saw it after all 😅 |
yeah a fix for this CI spew is here: #21613 - getting there |
If we create subscriptions in the buffer that we have before the full hour we shouldn't expect them to run right in this hour. This is getting wonky.
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Problem
Daily subscriptions are sent twice.
Theory: Since they run 5 minutes before the full hour, next delivery date will be scheduled again on same day (one hour later). Only then the
now
is larger then the intended date and next run will be scheduled correctly in a day.Follow up from #21419
Changes
Revert #21419 but add
max()
so that we never take a date in the past.Does this work well for both Cloud and self-hosted?
it doesn't have an impact
How did you test this code?