fix(workflow-engine-*): subscribe response and error (#6869)
This commit is contained in:
1 parent
d97af91a8d
commit
e603726985
6 files changed
+67
-43
No files matched your search
@@ -631,21 +631,30 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
transaction,
|
||||
})
|
||||
|
||||
const isAsync = step.isCompensating()
|
||||
? step.definition.compensateAsync
|
||||
: step.definition.async
|
||||
|
||||
const setStepFailure = async (
|
||||
error: Error | any,
|
||||
{ endRetry }: { endRetry?: boolean } = {}
|
||||
) => {
|
||||
return TransactionOrchestrator.setStepFailure(
|
||||
const ret = TransactionOrchestrator.setStepFailure(
|
||||
transaction,
|
||||
step,
|
||||
error,
|
||||
endRetry ? 0 : step.definition.maxRetries
|
||||
)
|
||||
}
|
||||
|
||||
const isAsync = step.isCompensating()
|
||||
? step.definition.compensateAsync
|
||||
: step.definition.async
|
||||
if (isAsync) {
|
||||
await transaction.scheduleRetry(
|
||||
step,
|
||||
step.definition.retryInterval ?? 0
|
||||
)
|
||||
}
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
if (!isAsync) {
|
||||
hasSyncSteps = true
|
||||
|
||||
Reference in new issue
Block a user