@@ -112,55 +112,11 @@ def __str__(self):
112
112
class TZNaiveSchedule (schedules .schedule ):
113
113
114
114
def maybe_make_aware (self , dt ):
115
+ """
116
+ Overriding the base method, to be a no-op and returning the dt as is.
117
+ """
115
118
return dt
116
119
117
- # def remaining_estimate(self, last_run_at):
118
- # return remaining(
119
- # last_run_at,
120
- # self.run_every,
121
- # self.now(),
122
- # self.relative
123
- # )
124
-
125
- # def is_due(self, last_run_at):
126
- # """Return tuple of ``(is_due, next_time_to_check)``.
127
-
128
- # Notes:
129
- # - next time to check is in seconds.
130
-
131
- # - ``(True, 20)``, means the task should be run now, and the next
132
- # time to check is in 20 seconds.
133
-
134
- # - ``(False, 12.3)``, means the task is not due, but that the
135
- # scheduler should check again in 12.3 seconds.
136
-
137
- # This is like `schedules.schedule` except it does not turn `last_run_at`
138
- # into a tzaware object.
139
-
140
- # The next time to check is used to save energy/CPU cycles,
141
- # it does not need to be accurate but will influence the precision
142
- # of your schedule. You must also keep in mind
143
- # the value of :setting:`beat_max_loop_interval`,
144
- # that decides the maximum number of seconds the scheduler can
145
- # sleep between re-checking the periodic task intervals. So if you
146
- # have a task that changes schedule at run-time then your next_run_at
147
- # check will decide how long it will take before a change to the
148
- # schedule takes effect. The max loop interval takes precedence
149
- # over the next check at value returned.
150
-
151
- # .. admonition:: Scheduler max interval variance
152
-
153
- # The default max loop interval may vary for different schedulers.
154
- # For the default scheduler the value is 5 minutes, but for example
155
- # the :pypi:`django-celery-beat` database scheduler the value
156
- # is 5 seconds.
157
- # """
158
- # rem_delta = self.remaining_estimate(last_run_at)
159
- # remaining_s = max(rem_delta.total_seconds(), 0)
160
- # if remaining_s == 0:
161
- # return schedules.schedstate(is_due=True, next=self.seconds)
162
- # return schedules.schedstate(is_due=False, next=remaining_s)
163
-
164
120
165
121
@python_2_unicode_compatible
166
122
class IntervalSchedule (models .Model ):
0 commit comments