Skip to content
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

DatabaseScheduler: Reload config when Cron or Interval was changed #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ebertti
Copy link

@ebertti ebertti commented Nov 26, 2014

Using the same signal when PeriodicTask was changed on Django ORM

@ebertti ebertti changed the title DatabaseScheduler: Reload config when Cron or Interval is changed DatabaseScheduler: Reload config when Cron or Interval was changed Nov 26, 2014
@ebertti
Copy link
Author

ebertti commented Jul 27, 2016

👀

@auvipy
Copy link
Member

auvipy commented Jul 27, 2016

any test and release notes for the proposed changes?

@@ -182,6 +184,8 @@ class PeriodicTasks(models.Model):
ident = models.SmallIntegerField(default=1, primary_key=True, unique=True)
last_update = models.DateTimeField(null=False)

no_changes = False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this line here? Maybe it should be moved to IntervalSchedule?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I try to re-use the same trigger for PeriodicTask when IntervalSchedule or CrontabSchedule has some change.

So, without this, you need to restart de celery beat to reload configuration of CrontabSchedule or IntervalSchedule, or you need to trigger some modification on PeriodicTask to reload configuration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems reasonable.
But this line is defined on PeriodicTasks class. I don't think it is needed here, since the signal is not connected with sender=PeriodicTasks. Meanwhile, IntervalSchedule doesn't have no_changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants