arq
arq copied to clipboard
Fix: timezone info occasionally removed from cron job execution time
This PR fixes a bug where timezone information was occasionally removed from execution time of cron jobs. The bug affected cron jobs which used the month-rule and when month was incremented due to that rule.
Since #354 all cron calculations are done on timezone aware datetimes. However, the tests for next_cron
function were not updated to include timezone in all test cases, which is how the bug slipped through. The tests are updated now to always use timezone.
Fixes: #380
Codecov Report
Merging #383 (4a0e151) into main (ab2dda2) will not change coverage. The diff coverage is
100.00%
.
Additional details and impacted files
@@ Coverage Diff @@
## main #383 +/- ##
=======================================
Coverage 98.40% 98.40%
=======================================
Files 11 11
Lines 1063 1063
Branches 200 200
=======================================
Hits 1046 1046
Misses 8 8
Partials 9 9
Files | Coverage Δ | |
---|---|---|
arq/cron.py | 100.00% <100.00%> (ø) |
Continue to review full report in Codecov by Sentry.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ab2dda2...4a0e151. Read the comment docs.
Tests has been fixed in #382, so don't worry about the pipelines failing for some Python versions.
Ready for merging :pray:
thanks so much, sorry for the long delay.
v0.26.0b1
is released, please try it, I'll release v0.26
at the end of the week, see #441.