Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Grebs EnTeQuAk

View GitHub Profile
View gist:1145266
curl -XPOST 'http://127.0.0.1:9200/forum/post/_search' -d '{"query": {"filtered": {"filter": {"script": {"params": {"forums": [1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]}, "script": "forums contains doc[\"forum_pk\"].value"}}, "query": {"query_string": {"query": "forum_pk:2", "default_operator": "AND"}}}}, "explain": true}'
View gist:820186
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`."""