feat: auto-trigger Discord wakeup when slot becomes ONGOING
This commit is contained in:
@@ -42,6 +42,7 @@ def config_status():
|
||||
return {
|
||||
"initialized": cfg.get("initialized", False),
|
||||
"backend_url": cfg.get("backend_url"),
|
||||
"discord": cfg.get("discord") or {},
|
||||
}
|
||||
except Exception:
|
||||
return {"initialized": False}
|
||||
@@ -358,6 +359,10 @@ def _migrate_schema():
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
|
||||
"""))
|
||||
|
||||
# --- time_slots: add wakeup_sent_at for Discord wakeup tracking ---
|
||||
if _has_table(db, "time_slots") and not _has_column(db, "time_slots", "wakeup_sent_at"):
|
||||
db.execute(text("ALTER TABLE time_slots ADD COLUMN wakeup_sent_at DATETIME NULL"))
|
||||
|
||||
db.commit()
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
|
||||
Reference in New Issue
Block a user