feat(monitor): persist health and recovery cooldown

Co-authored-by: GPT-6 <gpt-6@openai.com>
This commit is contained in:
ZeusinaandGPT-6 Bot committed 2026-10-10 08:04:48 +03:00
1 parent 5c540ce03b
commit 0c51fd0196
9 files changed
+497 -9

No files matched your search

+6 -1
View File
@@ -114,7 +114,7 @@ func migrate(db *sql.DB) error {
if err = conn.QueryRowContext(ctx, "PRAGMA user_version").Scan(&version); err != nil {
return err
}
if version > 3 {
if version > 4 {
return fmt.Errorf("unsupported database schema version %d", version)
}
if version == 0 {
@@ -231,6 +231,11 @@ PRAGMA user_version = 1;`)
if _, err := conn.ExecContext(ctx, googlevideoRunSchema); err != nil {
return err
}
if version < 4 {
if _, err := conn.ExecContext(ctx, monitorSchema); err != nil {
return err
}
}
_, err = conn.ExecContext(ctx, "COMMIT")
return err
}