From ed6cd8144bb8bb0cffe595ecc1956bb728cf0361 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Tue, 30 May 2023 16:52:22 +0100 Subject: [PATCH] lint --- packages/server/src/threads/automation.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/server/src/threads/automation.ts b/packages/server/src/threads/automation.ts index a24def349f..6dde6a5c99 100644 --- a/packages/server/src/threads/automation.ts +++ b/packages/server/src/threads/automation.ts @@ -38,7 +38,7 @@ const CRON_STEP_ID = triggerDefs.CRON.stepId const STOPPED_STATUS = { success: true, status: AutomationStatus.STOPPED } function getLoopIterations(loopStep: LoopStep) { - const binding = loopStep.inputs.binding + let binding = loopStep.inputs.binding if (!binding) { return 0 } @@ -251,7 +251,7 @@ class Orchestrator { return } } - + const start = performance.now() for (let step of automation.definition.steps) { if (timeoutFlag) { break @@ -344,6 +344,7 @@ class Orchestrator { } } } + if ( index === env.AUTOMATION_MAX_ITERATIONS || index === parseInt(loopStep.inputs.iterations) @@ -432,6 +433,7 @@ class Orchestrator { break } } + console.log("end of loop!") } if (loopStep && iterations === 0) { @@ -472,6 +474,11 @@ class Orchestrator { } } + const end = performance.now() + const executionTime = end - start + + console.log(`Execution time: ${executionTime} milliseconds`) + // store the logs for the automation run await storeLog(this._automation, this.executionOutput) if (isProdAppID(this._appId) && isRecurring(automation) && metadata) {