fix(): Workflow save to db + index integration instability (#13707)

**What**
- Fix index integration tests instability
- Fix workflow engine storage save to db
This commit is contained in:
Adrien de Peretti
2025-10-08 10:45:15 +02:00
committed by GitHub
parent c75a76636a
commit b43b285125
7 changed files with 234 additions and 72 deletions

View File

@@ -184,6 +184,8 @@ export class InMemoryDistributedTransactionStorage
TransactionState.FAILED,
TransactionState.REVERTED,
].includes(data.flow.state)
const isWaitingToCompensate =
data.flow.state === TransactionState.WAITING_TO_COMPENSATE
/**
* Bit of explanation:
@@ -236,7 +238,10 @@ export class InMemoryDistributedTransactionStorage
)
: false
if (!(isNotStarted || isFinished) && !currentStepsIsAsync) {
if (
!(isNotStarted || isFinished || isWaitingToCompensate) &&
!currentStepsIsAsync
) {
return
}