mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
Add arbitrary 1s wait after condition block to diagnose the out-of-order execution in production
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user