fd5f316af0
* refactor(automate): logs api can get the projectId from the path * fix(automate): multiregion gql resolvers * fix(automate): multiregion event listeners * fix(automate): drop automationCount * fix(automate): multiregion run status * fix(automate): correctness * fix(automate): actually finish event listeners * chore(automate): fix tests fix tests * fix(automate): fix tests but make it multiregion flavor * fix(automate): logs endpoint * chore(automate): globalDb to db * fix(automate): inject projectid correctly * fix(automate): debug log fetch failure * chore(automate): fix tests for new message --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
17 lines
446 B
TypeScript
17 lines
446 B
TypeScript
import {
|
|
AutomationRunStatus,
|
|
AutomationRunStatuses
|
|
} from '@/modules/automate/helpers/types'
|
|
|
|
export const isFinished = (runStatus: AutomationRunStatus) => {
|
|
const finishedStatuses: AutomationRunStatus[] = [
|
|
AutomationRunStatuses.succeeded,
|
|
AutomationRunStatuses.failed,
|
|
AutomationRunStatuses.exception,
|
|
AutomationRunStatuses.timeout,
|
|
AutomationRunStatuses.canceled
|
|
]
|
|
|
|
return finishedStatuses.includes(runStatus)
|
|
}
|