|
@@ -22,7 +22,22 @@ class schedule(object):
|
|
|
"""Returns tuple of two items ``(is_due, next_time_to_run)``,
|
|
|
where next time to run is in seconds.
|
|
|
|
|
|
- See :meth:`celery.task.base.PeriodicTask.is_due` for more information.
|
|
|
+ e.g.
|
|
|
+
|
|
|
+ * ``(True, 20)``, means the task should be run now, and the next
|
|
|
+ time to run is in 20 seconds.
|
|
|
+
|
|
|
+ * ``(False, 12)``, means the task should be run in 12 seconds.
|
|
|
+
|
|
|
+ You can override this to decide the interval at runtime,
|
|
|
+ but keep in mind the value of :setting:`CELERYBEAT_MAX_LOOP_INTERVAL`,
|
|
|
+ which decides the maximum number of seconds celerybeat can sleep
|
|
|
+ between re-checking the periodic task intervals. So if you
|
|
|
+ dynamically change the next run at value, and the max interval is
|
|
|
+ set to 5 minutes, it will take 5 minutes for the change to take
|
|
|
+ effect, so you may consider lowering the value of
|
|
|
+ :setting:`CELERYBEAT_MAX_LOOP_INTERVAL` if responsiveness is of
|
|
|
+ importance to you.
|
|
|
|
|
|
"""
|
|
|
rem_delta = self.remaining_estimate(last_run_at)
|
|
@@ -280,7 +295,7 @@ class crontab(schedule):
|
|
|
"""Returns tuple of two items ``(is_due, next_time_to_run)``,
|
|
|
where next time to run is in seconds.
|
|
|
|
|
|
- See :meth:`celery.task.base.PeriodicTask.is_due` for more information.
|
|
|
+ See :meth:`celery.schedules.schedule.is_due` for more information.
|
|
|
|
|
|
"""
|
|
|
rem_delta = self.remaining_estimate(last_run_at)
|