Skip to content

Commit 4d414e8

Browse files
committed
Only look at jobs we started
1 parent 46cd3a2 commit 4d414e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/components/Go.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const GoCommand = ({command, gameId, onComplete, onError}: GoCommandProps): JSX.
2828
const {jobs: startedJobs} = useStartShipOnMount(command, flags, onError)
2929

3030
const handleJobCompleted = async (job: any) => {
31+
if (job.id !== startedJobs?.[0].id) return
3132
const [goBuild] = await getJobBuildsRetry(job.id, command.getGameId())
3233
setQRCodeData(getShortUUID(goBuild.id))
3334
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms))
@@ -36,6 +37,7 @@ const GoCommand = ({command, gameId, onComplete, onError}: GoCommandProps): JSX.
3637
}
3738

3839
const handleJobFailed = (job: any) => {
40+
if (job.id !== startedJobs?.[0].id) return
3941
onError(new Error(`Go job failed: ${job.id}`))
4042
}
4143

0 commit comments

Comments
 (0)