fix onStepAwaiting events (#7161)
This commit is contained in:
committed by
GitHub
parent
11517f0faf
commit
edcafa140c
6
.changeset/twelve-crabs-clean.md
Normal file
6
.changeset/twelve-crabs-clean.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@medusajs/workflow-engine-redis": patch
|
||||
"@medusajs/orchestration": patch
|
||||
---
|
||||
|
||||
Fix onStepAwaiting event
|
||||
@@ -720,6 +720,9 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
)
|
||||
.then(async (response: any) => {
|
||||
if (!step.definition.backgroundExecution) {
|
||||
const eventName = DistributedTransactionEvent.STEP_AWAITING
|
||||
transaction.emit(eventName, { step, transaction })
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -752,9 +755,6 @@ export class TransactionOrchestrator extends EventEmitter {
|
||||
|
||||
await setStepFailure(error)
|
||||
})
|
||||
|
||||
const eventName = DistributedTransactionEvent.STEP_AWAITING
|
||||
transaction.emit(eventName, { step, transaction })
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
@@ -573,9 +573,7 @@ export class WorkflowOrchestratorService {
|
||||
|
||||
await notify({ eventType: "onStepAwaiting", step })
|
||||
|
||||
if (!step.definition.backgroundExecution) {
|
||||
this.activeStepsCount--
|
||||
}
|
||||
this.activeStepsCount--
|
||||
},
|
||||
|
||||
onCompensateStepSuccess: async ({ step, transaction }) => {
|
||||
|
||||
Reference in New Issue
Block a user