Update notification service

This commit is contained in:
MacRimi
2026-02-24 18:10:12 +01:00
parent 4182af75ff
commit 05cd21d44e
4 changed files with 24 additions and 24 deletions

View File

@@ -419,14 +419,6 @@ class NotificationManager:
self._task_watcher = TaskWatcher(self._event_queue)
self._polling_collector = PollingCollector(self._event_queue)
# Create hook_watcher eagerly so we can wire the cross-source dedup.
# TaskWatcher._webhook_delivered points at ProxmoxHookWatcher._delivered
# so TaskWatcher can skip backup/replication events the webhook already
# delivered with richer data (full logs, sizes, durations).
if not self._hook_watcher:
self._hook_watcher = ProxmoxHookWatcher(self._event_queue)
self._task_watcher._webhook_delivered = self._hook_watcher._delivered
self._journal_watcher.start()
self._task_watcher.start()
self._polling_collector.start()
@@ -874,6 +866,10 @@ class NotificationManager:
"""Process incoming Proxmox webhook. Delegates to ProxmoxHookWatcher."""
if not self._hook_watcher:
self._hook_watcher = ProxmoxHookWatcher(self._event_queue)
# Share the webhook's delivery record with TaskWatcher
# so tasks can yield to richer webhook data for backup/replication.
if self._task_watcher:
self._task_watcher._webhook_delivered = self._hook_watcher._delivered
return self._hook_watcher.process_webhook(payload)
def get_webhook_secret(self) -> str: