Skip to content

Commit

Permalink
fix(dsahboard): pending refetch state for test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Dec 23, 2024
1 parent d7fe69c commit 10f71f3
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@ export const TestWorkflowLogsSidebar = ({ transactionId }: TestWorkflowLogsSideb
if (!activities?.length) return;

const activity = activities[0];
const isPending = activity.jobs?.some((job) => job.status === JobStatusEnum.PENDING);
const isPending = activity.jobs?.some(
(job) =>
job.status === JobStatusEnum.PENDING ||
job.status === JobStatusEnum.QUEUED ||
job.status === JobStatusEnum.RUNNING ||
job.status === JobStatusEnum.DELAYED
);

// Only stop refetching if we have an activity and it's not pending
setShouldRefetch(isPending);
Expand Down

0 comments on commit 10f71f3

Please sign in to comment.