From b488ae8d3ad7ac5c426f42ba22ea64cbc48f24e8 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Wed, 29 Jul 2020 14:19:35 +0200 Subject: [PATCH] :shirt: Fix lint issue --- packages/cli/src/ActiveExecutions.ts | 2 +- packages/cli/src/Server.ts | 4 ++-- packages/cli/src/WorkflowRunner.ts | 16 ++++++++-------- packages/cli/src/WorkflowRunnerProcess.ts | 2 +- .../src/components/WorkflowSettings.vue | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/cli/src/ActiveExecutions.ts b/packages/cli/src/ActiveExecutions.ts index d62d09578b..8d7c73dd09 100644 --- a/packages/cli/src/ActiveExecutions.ts +++ b/packages/cli/src/ActiveExecutions.ts @@ -108,7 +108,7 @@ export class ActiveExecutions { this.activeExecutions[executionId].process!.send({ type: timeout ? timeout : 'stopExecution', }); - }, 1) + }, 1); } } else { // Workflow is running in current process diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index 2b68e409be..b7233b8cc7 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -486,9 +486,9 @@ class App { // Do not save when default got set delete newWorkflowData.settings.saveManualExecutions; } - if (parseInt(newWorkflowData.settings.executionTimeout as string) === this.executionTimeout) { + if (parseInt(newWorkflowData.settings.executionTimeout as string, 10) === this.executionTimeout) { // Do not save when default got set - delete newWorkflowData.settings.executionTimeout + delete newWorkflowData.settings.executionTimeout; } } diff --git a/packages/cli/src/WorkflowRunner.ts b/packages/cli/src/WorkflowRunner.ts index 5bb0120dfd..0eb4f7a016 100644 --- a/packages/cli/src/WorkflowRunner.ts +++ b/packages/cli/src/WorkflowRunner.ts @@ -158,14 +158,14 @@ export class WorkflowRunner { let executionTimeout: NodeJS.Timeout; let workflowTimeout = config.get('executions.timeout') as number > 0 && config.get('executions.timeout') as number; // initialize with default if (data.workflowData.settings && data.workflowData.settings.executionTimeout) { - workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number // preference on workflow setting + workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number; // preference on workflow setting } if (workflowTimeout) { const timeout = Math.min(workflowTimeout, config.get('executions.maxTimeout') as number) * 1000; // as seconds executionTimeout = setTimeout(() => { - this.activeExecutions.stopExecution(executionId, 'timeout') - }, timeout) + this.activeExecutions.stopExecution(executionId, 'timeout'); + }, timeout); } workflowExecution.then((fullRunData) => { @@ -174,7 +174,7 @@ export class WorkflowRunner { fullRunData.finished = false; } this.activeExecutions.remove(executionId, fullRunData); - }) + }); return executionId; } @@ -239,16 +239,16 @@ export class WorkflowRunner { let executionTimeout: NodeJS.Timeout; let workflowTimeout = config.get('executions.timeout') as number > 0 && config.get('executions.timeout') as number; // initialize with default if (data.workflowData.settings && data.workflowData.settings.executionTimeout) { - workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number // preference on workflow setting + workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number; // preference on workflow setting } if (workflowTimeout) { const timeout = Math.min(workflowTimeout, config.get('executions.maxTimeout') as number) * 1000; // as seconds executionTimeout = setTimeout(() => { - this.activeExecutions.stopExecution(executionId, 'timeout') + this.activeExecutions.stopExecution(executionId, 'timeout'); - executionTimeout = setTimeout(() => subprocess.kill(), Math.max(timeout * 0.2, 5000)) // minimum 5 seconds - }, timeout) + executionTimeout = setTimeout(() => subprocess.kill(), Math.max(timeout * 0.2, 5000)); // minimum 5 seconds + }, timeout); } diff --git a/packages/cli/src/WorkflowRunnerProcess.ts b/packages/cli/src/WorkflowRunnerProcess.ts index a0e9d0493f..41f467a8fd 100644 --- a/packages/cli/src/WorkflowRunnerProcess.ts +++ b/packages/cli/src/WorkflowRunnerProcess.ts @@ -198,7 +198,7 @@ process.on('message', async (message: IProcessMessage) => { // Workflow started already executing runData = workflowRunner.workflowExecute.getFullRunData(workflowRunner.startedAt); - const timeOutError = message.type === 'timeout' ? { message: 'Workflow execution timed out!' } as IExecutionError : undefined + const timeOutError = message.type === 'timeout' ? { message: 'Workflow execution timed out!' } as IExecutionError : undefined; // If there is any data send it to parent process, if execution timedout add the error await workflowRunner.workflowExecute.processSuccessExecution(workflowRunner.startedAt, workflowRunner.workflow!, timeOutError); diff --git a/packages/editor-ui/src/components/WorkflowSettings.vue b/packages/editor-ui/src/components/WorkflowSettings.vue index ff5e8e57d7..931514686e 100644 --- a/packages/editor-ui/src/components/WorkflowSettings.vue +++ b/packages/editor-ui/src/components/WorkflowSettings.vue @@ -122,15 +122,15 @@ -
+
hours
-
+
minutes
-
+
seconds