feat(FN-4332): complete Step 1 — add failure notification settings defaults
Fusion-Task-Id: FN-4332 Fusion-Task-Lineage: c920ac71-906b-458d-b496-1b60540b58f3
This commit is contained in:
@@ -160,5 +160,7 @@ describe("NotificationDispatcher", () => {
|
||||
"memory-dreams-processed",
|
||||
]);
|
||||
expect(DEFAULT_GLOBAL_SETTINGS.notificationProviders).toEqual([]);
|
||||
expect(DEFAULT_GLOBAL_SETTINGS.failureNotificationDelayMs).toBe(30000);
|
||||
expect(DEFAULT_GLOBAL_SETTINGS.failureNotificationMode).toBe("sticky-only");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,6 +39,8 @@ export const DEFAULT_GLOBAL_SETTINGS = {
|
||||
"memory-dreams-processed",
|
||||
],
|
||||
ntfyDashboardHost: undefined,
|
||||
failureNotificationDelayMs: 30000,
|
||||
failureNotificationMode: "sticky-only",
|
||||
webhookEnabled: false,
|
||||
webhookUrl: undefined,
|
||||
webhookFormat: "generic",
|
||||
|
||||
@@ -1685,6 +1685,13 @@ export interface GlobalSettings {
|
||||
* ?project=<id>&task=<id> so the dashboard opens the correct project first.
|
||||
* Example: "http://localhost:3000" or "https://fusion.example.com" */
|
||||
ntfyDashboardHost?: string;
|
||||
/** How long a task must remain in `status='failed'` before a push notification fires.
|
||||
* Set to 0 to dispatch immediately (legacy behavior). Default: 30000 ms. */
|
||||
failureNotificationDelayMs?: number;
|
||||
/** `sticky-only` (default) defers failure notifications by `failureNotificationDelayMs`
|
||||
* and suppresses them if the task self-recovers. `all` restores the legacy
|
||||
* immediate-dispatch behavior. */
|
||||
failureNotificationMode?: "sticky-only" | "all";
|
||||
/** When true, enables webhook notifications for task lifecycle events.
|
||||
* Requires webhookUrl to be set. Default: false. */
|
||||
webhookEnabled?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user