Skip to content

Commit

Permalink
Fix: Missed many places where SUCCESSFULL state is used
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasjelonek committed Jan 7, 2025
1 parent 5fb87b0 commit cd057bb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/model/job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const JobSchema = z.object({

export const JobStatusSchema = z.object({
jobId: z.string(),
jobStatus: z.enum(['INIT', 'RUNNING', 'SUCCESSFULL', 'ERROR']),
jobStatus: z.enum(['INIT', 'RUNNING', 'SUCCESSFULL', 'SUCCESSFUL', 'ERROR']),
name: z.string(),
started: z.string(),
updated: z.string(),
Expand Down
2 changes: 1 addition & 1 deletion src/pages/show-job-list/JobsTable.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const Default: Story = {
},
{
jobID: 'd',
jobStatus: 'SUCCESSFULL',
jobStatus: 'SUCCESSFUL',
key: 'D',
name: 'good genome',
started: '2006-06-06T02:02:02Z',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/show-job-list/JobsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ function stateIcon(state: JobStatus | FailedJobStatus): string {
return 'bi bi-hourglass'
case 'RUNNING':
return 'bi bi-gear'
case 'SUCCESSFUL':
case 'SUCCESSFULL':
return 'bi bi-check2-circle'
case 'NOT_FOUND':
case 'UNAUTHORIZED':
case 'ERROR':
return 'bi bi-x-circle'
}
return 'bi bi-x-circle'
}
</script>
1 change: 1 addition & 0 deletions src/pages/show-job-list/ListJobsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const { start, polling, cancel } = usePollManager(
x.every(
(j) =>
j.jobStatus === 'SUCCESSFULL' ||
j.jobStatus === 'SUCCESSFUL' ||
j.jobStatus === 'ERROR' ||
j.jobStatus === 'UNAUTHORIZED' ||
j.jobStatus === 'NOT_FOUND',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/show-results/ShowResultPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function loadJobData() {
.then((j) => {
job.value = j
const status = job.value.jobStatus
if (status === 'SUCCESSFULL' || status === 'ERROR') {
if (status === 'SUCCESSFULL' || status === 'SUCCESSFUL' || status === 'ERROR') {
// jobs is in finished state. No retry required
console.debug('Jobs is finished or failed, no need to refresh', job.value)
return bakta.result(jobToken).then((r) => {
Expand Down

0 comments on commit cd057bb

Please sign in to comment.