From 994c402dca0b1207c2d2b907e5e046353e56b7ec Mon Sep 17 00:00:00 2001 From: Vladimir Filonov Date: Mon, 30 Dec 2024 13:54:12 +0400 Subject: [PATCH] Filter out deleted and resolved incidents from association form --- keep-ui/utils/hooks/useIncidents.ts | 3 ++- keep/workflowmanager/workflowscheduler.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keep-ui/utils/hooks/useIncidents.ts b/keep-ui/utils/hooks/useIncidents.ts index e1c0c344d..34206ad54 100644 --- a/keep-ui/utils/hooks/useIncidents.ts +++ b/keep-ui/utils/hooks/useIncidents.ts @@ -10,6 +10,7 @@ import { useWebsocket } from "./usePusher"; import { useCallback, useEffect } from "react"; import { useAlerts } from "./useAlerts"; import { useApi } from "@/shared/lib/hooks/useApi"; +import {DefaultIncidentFilters} from "@/entities/incidents/model/models"; interface IncidentUpdatePayload { incident_id: string | null; @@ -28,7 +29,7 @@ export const useIncidents = ( limit: number = 25, offset: number = 0, sorting: { id: string; desc: boolean } = { id: "creation_time", desc: false }, - filters: Filters | {} = {}, + filters: Filters | {} = DefaultIncidentFilters, options: SWRConfiguration = { revalidateOnFocus: false, } diff --git a/keep/workflowmanager/workflowscheduler.py b/keep/workflowmanager/workflowscheduler.py index f8c916781..18ecca9cf 100644 --- a/keep/workflowmanager/workflowscheduler.py +++ b/keep/workflowmanager/workflowscheduler.py @@ -605,7 +605,7 @@ def _handle_event_workflows(self): self.futures.add(future) future.add_done_callback(lambda f: self.futures.remove(f)) - self.logger.info( + self.logger.debug( "Event workflows handled", extra={"current_number_of_workflows": len(self.futures)}, ) @@ -614,7 +614,7 @@ def _start(self): self.logger.info("Starting workflows scheduler") while not self._stop: # get all workflows that should run now - self.logger.info( + self.logger.debug( "Starting workflow scheduler iteration", extra={"current_number_of_workflows": len(self.futures)}, )