Add arbitrary 1s wait after condition block to diagnose the out-of-order execution in production

This commit is contained in:
Waleed Latif
2025-02-13 13:13:52 -08:00
parent 4291d79fc9
commit a1f7407eef

View File

@@ -264,6 +264,11 @@ export class Executor {
routerDecisions.set(block.id, routerResult.response.selectedPath.blockId)
} else if (block.metadata?.type === 'condition') {
const conditionResult = await this.executeConditionalBlock(block, context)
// Add a wait here to simulate a slow condition block
const waitTime = 1000
if (waitTime > 0) {
await new Promise((resolve) => setTimeout(resolve, waitTime))
}
activeConditionalPaths.set(block.id, conditionResult.selectedConditionId)
}