Skip to content

Commit

Permalink
fix(app): fix infinite cancelling run state when run status is idle->…
Browse files Browse the repository at this point in the history
…stop-requested
  • Loading branch information
mjhuff committed Feb 8, 2024
1 parent 4b96190 commit f3d9eec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/src/organisms/RunTimeControl/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ export function useRunStatus(
refetchInterval: DEFAULT_STATUS_REFETCH_INTERVAL,
enabled:
lastRunStatus.current == null ||
!([RUN_STATUS_FAILED, RUN_STATUS_SUCCEEDED] as RunStatus[]).includes(
lastRunStatus.current
),
!([
RUN_STATUS_FAILED,
RUN_STATUS_SUCCEEDED,
RUN_STATUS_STOP_REQUESTED,
] as RunStatus[]).includes(lastRunStatus.current),
onSuccess: data => (lastRunStatus.current = data?.data?.status ?? null),
...options,
})
Expand Down

0 comments on commit f3d9eec

Please sign in to comment.