Add ntfy push notification system with comprehensive configuration, API endpoints, and automatic event notifications for tasks, schedules, health checks, and bootstrap operations
This commit is contained in:
+10
-1
@@ -78,7 +78,16 @@ if DATABASE_URL.startswith("sqlite"):
|
||||
def _set_sqlite_pragmas(dbapi_connection, connection_record): # type: ignore[override]
|
||||
cursor = dbapi_connection.cursor()
|
||||
cursor.execute("PRAGMA foreign_keys=ON")
|
||||
cursor.execute("PRAGMA journal_mode=WAL")
|
||||
# WAL mode can fail on some Docker volume mounts (e.g., NFS, CIFS, overlay issues)
|
||||
# Fall back to DELETE mode if WAL fails
|
||||
try:
|
||||
cursor.execute("PRAGMA journal_mode=WAL")
|
||||
except Exception:
|
||||
# WAL not supported, use DELETE mode instead
|
||||
try:
|
||||
cursor.execute("PRAGMA journal_mode=DELETE")
|
||||
except Exception:
|
||||
pass # Ignore if this also fails
|
||||
cursor.close()
|
||||
|
||||
async_session_maker = async_sessionmaker(
|
||||
|
||||
@@ -36,6 +36,8 @@ class Schedule(Base):
|
||||
last_status: Mapped[Optional[str]] = mapped_column(String, default="never")
|
||||
retry_on_failure: Mapped[Optional[int]] = mapped_column(Integer, default=0)
|
||||
timeout: Mapped[Optional[int]] = mapped_column(Integer, default=3600)
|
||||
# Type de notification: "none" (aucune), "all" (toujours), "errors" (erreurs seulement)
|
||||
notification_type: Mapped[Optional[str]] = mapped_column(String, default="all")
|
||||
run_count: Mapped[Optional[int]] = mapped_column(Integer, default=0)
|
||||
success_count: Mapped[Optional[int]] = mapped_column(Integer, default=0)
|
||||
failure_count: Mapped[Optional[int]] = mapped_column(Integer, default=0)
|
||||
|
||||
Reference in New Issue
Block a user