fix: init git repo preview save (#6753)

This commit is contained in:
Alexander Petric
2025-10-03 21:48:11 +00:00
committed by GitHub
parent f28f5665fc
commit ac656ea81f
+6 -2
View File
@@ -78,7 +78,9 @@ export class JobManager {
try {
onProgress?.({ status: 'running' })
const result = await tryEvery({
let finalResult: T | undefined = undefined
await tryEvery({
tryCode: async () => {
if (controller.signal.aborted) {
throw new Error('Job was cancelled')
@@ -103,6 +105,8 @@ export class JobManager {
onProgress?.(status)
finalResult = jobResult.result as T
return jobResult.result as T
},
timeoutCode: async () => {
@@ -123,7 +127,7 @@ export class JobManager {
timeout
})
return result as T
return finalResult as T
} finally {
this.activeJobs.delete(jobId)
}