kiorky / croniter

MIT License
410 stars 40 forks source link

`get_next` behaviour seems to have changed in 1.3.0 #12

Closed agateblue closed 2 years ago

agateblue commented 2 years ago

Hi, i'm using croniter through Procrastinate, an asynchronous task scheduler and executor. Procrastinate relies on croniter to trigger recurring jobs.

My recurring jobs have stopped triggering today, and I've pinpointed the issue to this croniter commit: https://github.com/kiorky/croniter/commit/1ea781aa1936214088fa6451c5d62537045869dd

If I run my procrastinate worker with this croniter version, recurring jobs are not triggered. If I run my procrastinate worker with commit https://github.com/kiorky/croniter/commit/5298c6a3f365503f7c8d25b773d65c2e27b3ac9b (the previous one), everything works as expected.

Internally, Procrastinate uses the get_next() method to decide how much time to wait before trigerring a recurring job. This is the method that was modified in 1ea781aa1936214088fa6451c5d62537045869dd.

Do you you think 1ea781aa1936214088fa6451c5d62537045869dd could have introduced a backward incompatible change, or does the issue lies in Procrastinate itself (latest release was on 2021-12-19)?

kiorky commented 2 years ago

More likely a regression, may i kindly ask you to make me a failing testcase to debug it out ?

agateblue commented 2 years ago

@kiorky just submitted https://github.com/kiorky/croniter/pull/13 which should help!

kiorky commented 2 years ago

1.3.2 is out https://pypi.org/project/croniter/