Skip to content

Commit

Permalink
Prioritize running job over failed job on statuses (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
eXistenZNL authored Dec 4, 2023
1 parent 4370937 commit 7ce6a9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/store/status/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import Status, { State } from '/types/status';
export const getStatuses = (state: RootState): Status[] => state.status.statuses;

export const getGlobalState = (state: RootState): State => {
if (state.status.statuses.find((status) => status.state === 'error')) {
return 'error';
}

if (state.status.statuses.find((status) => status.state === 'warning')) {
return 'warning';
}

if (state.status.statuses.find((status) => status.state === 'error')) {
return 'error';
}

return 'success';
};

Expand Down

0 comments on commit 7ce6a9a

Please sign in to comment.