Sebastian Law
5439a67056
[tasks] Fix sleep handling behaviour depending on interval type
...
Relative time intervals can be thought of as:
for _ in range(count):
await body()
await asyncio.sleep(interval)
While explicit time intervals should be thought of as:
times = [1pm, 2pm, 3pm, 12am]
current = 0
for _ in range(count):
time = times.wrapping_index(current) # magic to wrap around
await utils.sleep_until(time)
await body()
current += 1
2022-03-05 05:12:22 -05:00
..
2022-03-04 21:17:27 -05:00
2020-12-12 20:23:57 -05:00
2022-03-05 05:12:22 -05:00
2022-03-01 01:00:04 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 05:35:29 -05:00
2022-02-20 08:04:58 -05:00
2022-03-01 07:53:24 -05:00
2022-02-20 08:04:58 -05:00
2022-02-18 09:00:09 -05:00
2022-03-01 01:00:04 -05:00
2022-03-01 01:00:04 -05:00
2022-02-21 22:43:19 -05:00
2022-03-01 07:53:24 -05:00
2022-03-05 05:03:23 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 07:53:24 -05:00
2022-02-23 16:05:08 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 07:41:33 -05:00
2022-03-04 21:17:27 -05:00
2022-02-26 01:44:49 -05:00
2022-02-20 08:04:58 -05:00
2022-03-01 07:53:24 -05:00
2022-02-27 21:18:41 -05:00
2022-03-01 05:54:26 -05:00
2022-03-01 07:53:24 -05:00
2022-02-26 01:44:49 -05:00
2022-03-05 05:03:23 -05:00
2022-03-01 07:53:24 -05:00
2022-03-02 01:39:39 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 07:53:24 -05:00
2022-02-20 08:04:58 -05:00
2022-02-20 08:04:58 -05:00
2022-02-20 08:04:58 -05:00
2022-02-26 01:44:49 -05:00
2022-03-01 07:53:24 -05:00
2022-03-02 01:51:47 -05:00
2022-03-01 07:53:24 -05:00
2021-08-22 02:25:13 -04:00
2022-02-21 22:09:40 -05:00
2022-02-26 01:44:49 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 01:00:04 -05:00
2022-03-05 05:03:23 -05:00
2022-03-01 01:00:04 -05:00
2022-03-05 05:03:23 -05:00
2022-02-22 03:59:58 -05:00
2021-06-28 23:36:20 -04:00
2022-02-26 01:44:49 -05:00
2022-02-19 22:35:32 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 05:42:44 -05:00
2022-02-22 08:51:11 -05:00
2022-03-01 01:00:04 -05:00