diff --git a/src/components/Playbooks/Runs/Actions/PlaybookRunActionFetch.tsx b/src/components/Playbooks/Runs/Actions/PlaybookRunActionFetch.tsx index 27b8dc39a..bb54f13c1 100644 --- a/src/components/Playbooks/Runs/Actions/PlaybookRunActionFetch.tsx +++ b/src/components/Playbooks/Runs/Actions/PlaybookRunActionFetch.tsx @@ -27,7 +27,13 @@ export default function PlaybookRunActionFetch({ queryFn: () => getPlaybookRunActionById(playbookRunActionId), enabled: !!playbookRunActionId, staleTime: 0, - cacheTime: 0 + cacheTime: 0, + refetchInterval: (data) => { + if (data?.status !== "completed" && data?.status !== "failed") { + return 1000; + } + return false; + } }); useEffect(() => { diff --git a/src/pages/playbooks/PlaybookRunsDetails.tsx b/src/pages/playbooks/PlaybookRunsDetails.tsx index 2452ce476..291401dab 100644 --- a/src/pages/playbooks/PlaybookRunsDetails.tsx +++ b/src/pages/playbooks/PlaybookRunsDetails.tsx @@ -45,7 +45,7 @@ export default function PlaybookRunsDetailsPage() { playbookRun?.status === "waiting" || playbookRun?.status === "pending" ) { - return 5000; + return 2000; } return false; }