arq icon indicating copy to clipboard operation
arq copied to clipboard

Fix: timezone info occasionally removed from cron job execution time

Open iamlikeme opened this issue 2 years ago • 3 comments

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

iamlikeme avatar Dec 18 '22 20:12 iamlikeme

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.

codecov[bot] avatar Dec 18 '22 20:12 codecov[bot]

Tests has been fixed in #382, so don't worry about the pipelines failing for some Python versions.

JonasKs avatar Dec 18 '22 20:12 JonasKs

Ready for merging :pray:

iamlikeme avatar Nov 30 '23 20:11 iamlikeme

thanks so much, sorry for the long delay.

samuelcolvin avatar Apr 01 '24 10:04 samuelcolvin

v0.26.0b1 is released, please try it, I'll release v0.26 at the end of the week, see #441.

samuelcolvin avatar Apr 01 '24 18:04 samuelcolvin