Return a utc timestamp, make sure heapq in correct order.
(self, entry, next_time_to_run, mktime=timegm)
| 298 | return entry.is_due() |
| 299 | |
| 300 | def _when(self, entry, next_time_to_run, mktime=timegm): |
| 301 | """Return a utc timestamp, make sure heapq in correct order.""" |
| 302 | adjust = self.adjust |
| 303 | |
| 304 | as_now = maybe_make_aware(entry.default_now()) |
| 305 | |
| 306 | return (mktime(as_now.utctimetuple()) + |
| 307 | as_now.microsecond / 1e6 + |
| 308 | (adjust(next_time_to_run) or 0)) |
| 309 | |
| 310 | def populate_heap(self, event_t=event_t, heapify=heapq.heapify): |
| 311 | """Populate the heap with the data contained in the schedule.""" |