Skip to content

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?

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.

@auvipy auvipy requested a review from Copilot May 13, 2025 09:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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