Bartok9
3845d86b93
fix(cron): restore jobs.json emptied by config migration on update
...
Config-version migrations have been observed to leave cron/jobs.json
valid-but-empty after `hermes update`, silently dropping every scheduled
job (#34600 ). The existing malformed-shape guards in cron/jobs.py don't
catch this because {"jobs": []} is valid JSON.
Add restore_cron_jobs_if_emptied() as a post-migration safety net: if the
live cron/jobs.json now has zero jobs while the pre-update snapshot held
one or more, restore the snapshot copy in place and warn loudly. The
check is conservative — it only restores on unambiguous evidence of loss
(snapshot had jobs, live file readable-and-empty), so a user who genuinely
cleared their jobs is never second-guessed and an unreadable live file is
left untouched so real corruption still surfaces.
Wired into _cmd_update_impl after migrate_config(), reusing the existing
pre-update quick snapshot (which already captures cron/jobs.json).
Closes #34600
2026-05-29 13:22:54 -07:00
..
2026-05-29 12:17:12 +10:00
2026-05-29 04:22:27 -07:00
2026-05-28 18:11:49 -07:00
2026-05-23 21:03:51 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 02:24:48 -07:00
2026-05-29 02:24:48 -07:00
2026-05-18 10:14:38 -07:00
2026-05-29 13:22:54 -07:00
2026-05-29 04:22:27 -07:00
2026-05-19 22:34:05 -07:00
2026-05-28 15:14:05 +10:00
2026-05-28 22:26:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-11 11:13:25 -07:00
2026-05-25 01:20:33 -07:00
2026-05-13 22:54:21 -07:00
2026-05-27 12:16:15 -07:00
2026-05-15 02:31:30 -07:00
2026-05-17 02:29:41 -07:00
2026-03-30 17:07:21 -07:00
2026-05-28 11:33:16 -07:00
2026-05-13 09:34:15 -07:00
2026-05-29 04:10:05 -07:00
2026-05-25 12:23:23 +10:00
2026-05-11 11:13:25 -07:00
2026-05-18 17:39:50 +00:00
2026-05-11 11:13:25 -07:00
2026-05-21 23:40:58 -07:00
2026-05-29 04:22:27 -07:00
2026-03-26 01:34:27 -07:00
2026-05-18 16:34:24 +05:30
2026-05-11 11:13:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 15:14:05 +10:00
2026-05-25 15:18:55 -07:00
2026-05-23 05:24:57 -07:00
2026-05-23 05:24:57 -07:00
2026-05-28 03:25:32 -07:00
2026-05-29 12:36:59 -07:00
2026-05-16 23:05:27 -07:00
2026-05-11 11:13:25 -07:00
2026-05-13 22:31:11 -07:00
2026-05-29 04:22:27 -07:00
2026-05-27 22:07:49 -07:00
2026-05-29 04:22:27 -07:00
2026-05-27 22:07:49 -07:00
2026-05-28 21:00:46 -07:00
2026-05-28 23:41:44 -07:00
2026-04-11 17:23:36 -07:00
2026-05-29 13:22:54 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 12:32:19 -07:00
2026-05-26 12:48:14 -07:00
2026-05-25 01:20:33 -07:00
2026-05-20 09:18:23 -07:00
2026-05-29 00:25:36 -07:00
2026-05-27 00:43:32 -07:00
2026-05-29 12:32:35 -07:00
2026-05-29 04:27:58 -07:00
2026-05-28 00:19:31 -07:00
2026-05-29 22:26:24 +05:30
2026-05-23 18:18:41 -07:00
2026-05-07 07:18:21 -07:00
2026-04-29 21:56:51 -07:00
2026-05-29 00:59:42 -07:00
2026-05-28 22:26:25 -07:00
2026-05-29 04:22:27 -07:00
2026-05-28 22:26:25 -07:00
2026-05-25 05:07:58 -07:00
2026-05-29 12:32:47 -07:00
2026-05-27 00:43:32 -07:00
2026-05-28 02:36:09 -07:00
2026-05-29 00:31:44 -07:00
2026-05-11 11:13:25 -07:00
2026-05-08 14:27:40 -07:00
2026-05-29 02:24:48 -07:00
2026-05-25 01:20:33 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-16 23:00:58 -05:00
2026-05-28 13:42:27 +10:00
2026-05-17 02:29:41 -07:00
2026-05-29 22:26:24 +05:30
2026-04-29 04:03:03 -07:00
2026-05-28 04:53:13 -07:00
2026-05-18 20:05:23 -07:00
2026-05-08 17:01:12 -07:00
2026-05-28 22:26:25 -07:00
2026-05-28 22:26:25 -07:00
2026-05-19 14:25:10 -07:00
2026-05-26 15:41:11 -07:00
2026-05-29 22:26:24 +05:30
2026-05-18 20:05:47 -07:00
2026-05-06 15:49:59 -07:00
2026-05-29 02:24:48 -07:00
2026-05-24 04:55:18 -07:00
2026-05-20 09:18:23 -07:00