added reminder

This commit is contained in:
2026-06-11 11:04:22 +03:00
parent 363aca293a
commit f7cc238308
22 changed files with 1265 additions and 2 deletions
+19
View File
@@ -0,0 +1,19 @@
from sqlalchemy.orm import Session
from app.homelab.state import get_state, set_state
NOTIFY_SEQ_KEY = "reminders_notify_seq"
def get_notify_seq(db: Session) -> int:
raw = get_state(db, NOTIFY_SEQ_KEY)
try:
return int(raw or 0)
except ValueError:
return 0
def bump_notify_seq(db: Session) -> int:
seq = get_notify_seq(db) + 1
set_state(db, NOTIFY_SEQ_KEY, str(seq))
return seq