-
Notifications
You must be signed in to change notification settings - Fork 414
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 clocked schedule #341
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.
can you explain more of your reason for this approach?
@@ -186,12 +186,6 @@ class ClockedSchedule(models.Model): | |||
verbose_name=_('Clock Time'), | |||
help_text=_('Run the task at clocked time'), | |||
) | |||
enabled = models.BooleanField( |
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 a breaking change
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 you explain more of your reason for this approach?
I maybe handle it before this weekends(timezone: Beijing). too busy 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.
we can introduce swapalbe/ abstract base model as Django-activity-stream did
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.
Or we can keep it but it always True.
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.
what about default=False?
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.
But it act as always True.
I will work on this PR. |
I change clocked model, remove enabled field, use |
I am looking forward for this PR, @yywing it is great that you have been able to track, understand fix one of the most hideous and awkward bugs of this extension. |
just to add some hype: pip install git+https://github.com/yywing/django-celery-beat/@f2bdc5214b3c70ee3805654855ab08e55452df69 |
hi, any news on when this PR is going to be released? |
there are some concerns regarding backward compat |
too bad. My experience with my use case and django_celery_beat was that everything worked for days before stop working randomly (then I understood it was not literally randomly but there was a reason), and this fix definitely fixed everything. So I really hope this could go in production as soon as possible. I am not confident with celery or this package, but if I can help with some real world testing I'd be more than happy to do so. |
please do some more real-world testing and report back |
my production environment started using this package about 10 days ago. We were able to run hundreds of task, and the scheduled tasks never stopped once. Before this fix, after a few days, some condition would make celery beat block on one task and stop process the tasks all together. I hope this helps. Please let me know if there is anything specific I could test. |
Is it possible to release this fix please? |
Next week Hopefully |
@auvipy Will this be released soon? Trying to use clocked schedule in a production setting and running into issues |
Just checking in again. Is there an eta for when this fix will be released? |
hope full this week. ping me again |
Any updates about this? |
still waiting |
@auvipy any news? |
@auvipy Any updates? |
I really wish I'd seen this PR earlier. I started using clocked schedule last month. Like everyone else, things started working fine and then at some point, the clocked tasks stopped being processed. What I found out is that whenever there is one task where Later I was able to reproduce it consistently by scheduling a task, then stopping celery beat until the scheduled time of the task has passed. When celery beat is brought back up after that, the scheduled task, that should have executed when celery beat was down, is picked up and gets executed. So, Anyway, right before deciding to switch to one-off tasks using crontab schedule, I saw that there is a new version and when checking the commits , I found this PR. Now, that |
Looks like |
Clocked schedule is stateless.
It can run once because of PeriodicTask.one_off.