diff options
author | 2020-03-31 20:53:53 +0200 | |
---|---|---|
committer | 2020-03-31 21:24:39 +0200 | |
commit | d7c413be5274551e75860ed4b2bfbe826d8521a1 (patch) | |
tree | ab5cdb482a508a00be82ca1c12c122a3d25b8329 /bot/utils/decorators.py | |
parent | Deseasonify: validate season setup (diff) |
Deseasonify: yield ints representing days since cycle
Previously, the `should_cycle` iterator would signal that it is time
to cycle by yielding True. As per Mark's suggestion, this is adjusted
to yield either None, or ints representing days since last cycle.
This is more transparent, as the daemon can now perform the comparison
against the configured cycle frequency itself, rather than relying
on being fed the correct value from a "black box".
See `_reset_should_cycle` docstring for further clarification.
Co-authored-by: MarkKoz <[email protected]>
Diffstat (limited to 'bot/utils/decorators.py')
0 files changed, 0 insertions, 0 deletions