agronholm / apscheduler

Task scheduling library for Python
MIT License
6.18k stars 704 forks source link

Fix `CronTrigger` deserialization for `JSONSerializer` #824

Closed tdzienniak closed 10 months ago

tdzienniak commented 10 months ago

I noticed that the field _last_fire_time in CronTrigger is not properly deserialized when JSONSerializer is used, which causes the following error: image

I added a converter to ensure this field is always a valid datetime.

coveralls commented 10 months ago

Coverage Status

coverage: 91.677%. remained the same when pulling 1fc75f68ba3d389dbb55f7ef8156b033a60ceee5 on Optibus:master into 3a8977cbc34e87ebdeda9253beb9d16ff80ee3f1 on agronholm:master.

agronholm commented 10 months ago

Thanks, good catch! Now I have to fix the same issue in IntervalTrigger and CalendarIntervalTrigger too...