Phase 5.15: Automated backup system with pg_dump, file backup, retention, restore, notifications
This commit is contained in:
@@ -34,6 +34,8 @@ class SystemNotifPlugin(BasePlugin):
|
||||
"user.created",
|
||||
"workflow.completed",
|
||||
"notification.created",
|
||||
"backup.completed",
|
||||
"backup.failed",
|
||||
],
|
||||
migrations=[],
|
||||
permissions=["system_notif:read"],
|
||||
@@ -112,6 +114,14 @@ class SystemNotifPlugin(BasePlugin):
|
||||
"""
|
||||
await self._create_system_notification(payload, event_type="notification.created")
|
||||
|
||||
async def on_backup_completed(self, payload: dict[str, Any]) -> None:
|
||||
"""Handle backup.completed event → system message."""
|
||||
await self._create_system_notification(payload, event_type="backup.completed")
|
||||
|
||||
async def on_backup_failed(self, payload: dict[str, Any]) -> None:
|
||||
"""Handle backup.failed event → system message (error)."""
|
||||
await self._create_system_notification(payload, event_type="backup.failed", severity="error")
|
||||
|
||||
async def _create_system_notification(
|
||||
self,
|
||||
payload: dict[str, Any],
|
||||
@@ -155,6 +165,8 @@ class SystemNotifPlugin(BasePlugin):
|
||||
"user.created": "Neuer Benutzer",
|
||||
"workflow.completed": "Workflow abgeschlossen",
|
||||
"notification.created": "Benachrichtigung",
|
||||
"backup.completed": "Backup erfolgreich",
|
||||
"backup.failed": "Backup fehlgeschlagen",
|
||||
}
|
||||
title = event_titles.get(event_type, event_type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user