Created
February 10, 2011 09:17
-
-
Save EnTeQuAk/820186 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/djcelery/schedulers.py b/djcelery/schedulers.py | |
index cf17f3b..eaa5525 100644 | |
--- a/djcelery/schedulers.py | |
+++ b/djcelery/schedulers.py | |
@@ -51,6 +51,13 @@ class ModelEntry(ScheduleEntry): | |
self.model.no_changes = True | |
return self.__class__(self.model) | |
+ def is_due(self): | |
+ """See :meth:`celery.task.base.PeriodicTask.is_due`.""" | |
+ due = self.schedule.is_due(self.last_run_at) | |
+ if self.model.enabled: | |
+ return due | |
+ return False, due | |
+ | |
def save(self): | |
# Object may not be synchronized, so only | |
# change the fields we care about. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment