MCPcopy
hub / github.com/celery/celery / remaining_estimate

Method remaining_estimate

celery/schedules.py:630–639  ·  view source on GitHub ↗

Estimate of next run time. Returns when the periodic task should run next as a :class:`~datetime.timedelta`.

(
            self, last_run_at: datetime, ffwd: type = ffwd)

Source from the content-addressed store, hash-verified

628 return self.to_local(last_run_at), delta, self.to_local(now)
629
630 def remaining_estimate(
631 self, last_run_at: datetime, ffwd: type = ffwd) -> timedelta:
632 """Estimate of next run time.
633
634 Returns when the periodic task should run next as a
635 :class:`~datetime.timedelta`.
636 """
637 # pylint: disable=redefined-outer-name
638 # caching global ffwd
639 return remaining(*self.remaining_delta(last_run_at, ffwd=ffwd))
640
641 def is_due(self, last_run_at: datetime) -> tuple[bool, datetime]:
642 """Return tuple of ``(is_due, next_time_to_run)``.

Callers 1

is_dueMethod · 0.95

Calls 2

remaining_deltaMethod · 0.95
remainingFunction · 0.85

Tested by

no test coverage detected