chore(): Workflow engine timers and notification improvements (#13434)
RESOLVES CORE-1177 **What** main changes are: - not blocking execution when notifying - timers management - race condition checks improvements
This commit is contained in:
committed by
GitHub
parent
b776fd55dc
commit
fc4d5f0ac9
@@ -566,7 +566,11 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
cleaningUp.push(transaction.clearStepTimeout(step))
|
||||
}
|
||||
|
||||
await promiseAll(cleaningUp)
|
||||
if (cleaningUp.length) {
|
||||
setImmediate(async () => {
|
||||
await promiseAll(cleaningUp)
|
||||
})
|
||||
}
|
||||
|
||||
if (shouldEmit) {
|
||||
const eventName = step.isCompensating()
|
||||
@@ -645,7 +649,11 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
cleaningUp.push(transaction.clearStepTimeout(step))
|
||||
}
|
||||
|
||||
await promiseAll(cleaningUp)
|
||||
if (cleaningUp.length) {
|
||||
setImmediate(async () => {
|
||||
await promiseAll(cleaningUp)
|
||||
})
|
||||
}
|
||||
|
||||
if (shouldEmit) {
|
||||
const eventName = DistributedTransactionEvent.STEP_SKIPPED
|
||||
@@ -847,7 +855,11 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
cleaningUp.push(transaction.clearRetry(step))
|
||||
}
|
||||
|
||||
await promiseAll(cleaningUp)
|
||||
if (cleaningUp.length) {
|
||||
setImmediate(async () => {
|
||||
await promiseAll(cleaningUp)
|
||||
})
|
||||
}
|
||||
|
||||
if (!result.stopExecution) {
|
||||
const eventName = step.isCompensating()
|
||||
|
||||
Reference in New Issue
Block a user