feat(scheduler): add snapshot-seed CLI and 10m seed deferral
Add `python app.py snapshot-seed [--date]` (offline clone, Debian / docker compose exec friendly). When seed fires while full-site snapshot is running, or last_completed is missing (no_source), record skip as non-success and retry in 10 minutes until a real seed succeeds; fans and quiet-window rules unchanged.
This commit is contained in:
1 parent
9969e65202
commit
bb18d232f6
7 files changed
+374
-8
No files matched your search
@@ -1982,6 +1982,7 @@ class DashboardQueries:
|
||||
"snapshot_recent": int(interval_next_run(now, float(recent_interval))),
|
||||
}
|
||||
retry_seconds = 300
|
||||
seed_retry_seconds = 600
|
||||
for name, key, at in (
|
||||
("fans", "fans", cfg.schedule.snapshot_at),
|
||||
("snapshot", "snapshot", cfg.schedule.snapshot_at),
|
||||
@@ -2015,7 +2016,12 @@ class DashboardQueries:
|
||||
else:
|
||||
if skipped or failed:
|
||||
# 日更任务失败/skip:短间隔补跑,绝不按成功推到次日。
|
||||
next_runs[name] = int(finished_at + retry_seconds)
|
||||
# snapshot_seed:全站快照占用 / no_source 时 10 分钟补跑。
|
||||
gap = (
|
||||
seed_retry_seconds if name == "snapshot_seed"
|
||||
else retry_seconds
|
||||
)
|
||||
next_runs[name] = int(finished_at + gap)
|
||||
else:
|
||||
next_runs[name] = int(next_daily_run(finished_at, at))
|
||||
errors = [
|
||||
|
||||
Reference in new issue
Block a user