fix(cron): also coerce null createdAtMs/updatedAtMs on load

Same present-null footgun as runHistory; route all required store
ints through _store_int.
This commit is contained in:
santhreal authored and Xubin Ren committed 2026-07-21 13:45:02 +08:00
1 parent 0b1b02f187
commit b6156fdd79
2 files changed
+9 -9

No files matched your search

+4 -2
View File
@@ -1032,8 +1032,8 @@ def test_load_jobs_accepts_null_run_history_ms(tmp_path) -> None:
{"runAtMs": None, "status": "ok", "durationMs": None},
],
},
"createdAtMs": 0,
"updatedAtMs": 0,
"createdAtMs": None,
"updatedAtMs": None,
}
],
}
@@ -1046,3 +1046,5 @@ def test_load_jobs_accepts_null_run_history_ms(tmp_path) -> None:
assert jobs[0].state.run_history[0].run_at_ms == 0
assert jobs[0].state.run_history[0].duration_ms == 0
assert jobs[0].state.run_history[0].status == "ok"
assert jobs[0].created_at_ms == 0
assert jobs[0].updated_at_ms == 0