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-01 01:00:04 -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-03-01 07:53:24 -05:00
2022-03-01 07:53:24 -05:00
2022-03-01 07:53:24 -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-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-01 07:53:24 -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
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-02-22 03:59:58 -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