Return tuple of ``(is_due, next_time_to_run)``. Note: next time to run is in seconds. See Also: :meth:`celery.schedules.schedule.is_due` for more information.
(self, last_run_at: datetime)
| 861 | return delta |
| 862 | |
| 863 | def is_due(self, last_run_at: datetime) -> tuple[bool, datetime]: |
| 864 | """Return tuple of ``(is_due, next_time_to_run)``. |
| 865 | |
| 866 | Note: |
| 867 | next time to run is in seconds. |
| 868 | |
| 869 | See Also: |
| 870 | :meth:`celery.schedules.schedule.is_due` for more information. |
| 871 | """ |
| 872 | rem_delta = self.remaining_estimate(last_run_at) |
| 873 | rem = max(rem_delta.total_seconds(), 0) |
| 874 | due = rem == 0 |
| 875 | if due: |
| 876 | rem_delta = self.remaining_estimate(self.now()) |
| 877 | rem = max(rem_delta.total_seconds(), 0) |
| 878 | return schedstate(due, rem) |
| 879 | |
| 880 | def __eq__(self, other: Any) -> bool: |
| 881 | if isinstance(other, solar): |
nothing calls this directly
no test coverage detected