mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-23 04:02:16 +00:00
Update notification service
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user