1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix(jobExecutor): appending resend requests before login call

This commit is contained in:
Saad Jutt
2021-09-20 12:52:49 +05:00
parent dc91679040
commit e5655033c1
3 changed files with 6 additions and 5 deletions

View File

@@ -78,8 +78,8 @@ export const basicTests = (
'common/sendArr',
stringData,
undefined,
() => {
adapter.logIn(userName, password)
async () => {
await adapter.logIn(userName, password)
}
)
},

View File

@@ -45,7 +45,6 @@ export class ComputeJobExecutor extends BaseJobExecutor {
}
if (e instanceof LoginRequiredError) {
await loginCallback()
this.appendWaitingRequest(() => {
return this.execute(
sasJob,
@@ -61,6 +60,8 @@ export class ComputeJobExecutor extends BaseJobExecutor {
}
)
})
await loginCallback()
} else {
reject(new ErrorResponse(e?.message, e))
}

View File

@@ -45,8 +45,6 @@ export class JesJobExecutor extends BaseJobExecutor {
}
if (e instanceof LoginRequiredError) {
await loginCallback()
this.appendWaitingRequest(() => {
return this.execute(
sasJob,
@@ -64,6 +62,8 @@ export class JesJobExecutor extends BaseJobExecutor {
}
)
})
await loginCallback()
} else {
reject(new ErrorResponse(e?.message, e))
}