fix(system): three next-runs, completed-date data_date, running mark
Split /system schedule into fans / snapshot+UP / discovery next-runs. Drive data_date and snapshot_days from fully completed video snapshots only, keep prior success date on failure, show task failure records, and mark in-progress tasks as 运行中 without wall-clock next-run jumps.
This commit is contained in:
1 parent
0b92e10317
commit
af90ce8f87
9 files changed
+411
-52
No files matched your search
@@ -166,6 +166,8 @@ def build_db(tmp: str | Path) -> Path:
|
||||
repo.mark_candidate_decision(202, "rejected", now=ts("2026-10-30"))
|
||||
repo.finish_folder_sync(FOLDER, media_count=3, full_refresh=True)
|
||||
repo.kv_set("snapshot:last_completed", DATES[-1])
|
||||
for day in DATES:
|
||||
repo.kv_set(f"snapshot:completed:{day}", "1")
|
||||
repo.kv_set("auth:ok", "1")
|
||||
repo.kv_set("auth:message", "OK")
|
||||
repo.kv_set(
|
||||
@@ -176,6 +178,22 @@ def build_db(tmp: str | Path) -> Path:
|
||||
"error": None, "summary": {"completed": True},
|
||||
}),
|
||||
)
|
||||
repo.kv_set(
|
||||
"task:last:fans",
|
||||
json.dumps({
|
||||
"name": "fans", "ok": True,
|
||||
"started_at": ts(DATES[-1]) + 60, "finished_at": ts(DATES[-1]) + 90,
|
||||
"error": None, "summary": {"fans_ok": 1, "fans_failed": 0},
|
||||
}),
|
||||
)
|
||||
repo.kv_set(
|
||||
"task:last:discovery",
|
||||
json.dumps({
|
||||
"name": "discovery", "ok": True,
|
||||
"started_at": ts(DATES[-1]) - 3600, "finished_at": ts(DATES[-1]) - 3500,
|
||||
"error": None, "summary": {"candidates": 0},
|
||||
}),
|
||||
)
|
||||
finally:
|
||||
db.close()
|
||||
return path
|
||||
|
||||
Reference in new issue
Block a user