From a0b89ee5a4e6c375ac87ea8b62f3a92de66a6413 Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 21 Oct 2021 18:24:43 -0500 Subject: [PATCH] :zap: Remove more not used code --- packages/cli/commands/execute.ts | 2 -- packages/cli/commands/executeBatch.ts | 6 +----- packages/cli/commands/start.ts | 5 +---- packages/cli/commands/update/workflow.ts | 3 +-- packages/cli/commands/webhook.ts | 2 -- packages/cli/commands/worker.ts | 14 ++------------ 6 files changed, 5 insertions(+), 27 deletions(-) diff --git a/packages/cli/commands/execute.ts b/packages/cli/commands/execute.ts index 374c753e99..b6641628df 100644 --- a/packages/cli/commands/execute.ts +++ b/packages/cli/commands/execute.ts @@ -15,8 +15,6 @@ import { IWorkflowExecutionDataProcess, LoadNodesAndCredentials, NodeTypes, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - WorkflowCredentials, WorkflowHelpers, WorkflowRunner, } from '../src'; diff --git a/packages/cli/commands/executeBatch.ts b/packages/cli/commands/executeBatch.ts index ec4d68dd03..d4489c38d4 100644 --- a/packages/cli/commands/executeBatch.ts +++ b/packages/cli/commands/executeBatch.ts @@ -12,7 +12,7 @@ import { Command, flags } from '@oclif/command'; import { UserSettings } from 'n8n-core'; // eslint-disable-next-line @typescript-eslint/no-unused-vars -import { INode, INodeExecutionData, ITaskData, LoggerProxy } from 'n8n-workflow'; +import { INode, ITaskData, LoggerProxy } from 'n8n-workflow'; import { sep } from 'path'; @@ -28,14 +28,10 @@ import { CredentialTypes, Db, ExternalHooks, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - IExecutionsCurrentSummary, IWorkflowDb, IWorkflowExecutionDataProcess, LoadNodesAndCredentials, NodeTypes, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - WorkflowCredentials, WorkflowRunner, } from '../src'; diff --git a/packages/cli/commands/start.ts b/packages/cli/commands/start.ts index 3ecbddc0e7..d12957209a 100644 --- a/packages/cli/commands/start.ts +++ b/packages/cli/commands/start.ts @@ -22,8 +22,6 @@ import { Db, ExternalHooks, GenericHelpers, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - IExecutionsCurrentSummary, InternalHooksManager, LoadNodesAndCredentials, NodeTypes, @@ -320,8 +318,7 @@ export class Start extends Command { activeWorkflowRunner = ActiveWorkflowRunner.getInstance(); await activeWorkflowRunner.init(); - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const waitTracker = WaitTracker(); + WaitTracker(); const editorUrl = GenericHelpers.getBaseUrl(); this.log(`\nEditor is now accessible via:\n${editorUrl}`); diff --git a/packages/cli/commands/update/workflow.ts b/packages/cli/commands/update/workflow.ts index b3d777de7d..7c598b4e82 100644 --- a/packages/cli/commands/update/workflow.ts +++ b/packages/cli/commands/update/workflow.ts @@ -4,8 +4,7 @@ import { Command, flags } from '@oclif/command'; import { IDataObject, LoggerProxy } from 'n8n-workflow'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars -import { Db, GenericHelpers } from '../../src'; +import { Db } from '../../src'; import { getLogger } from '../../src/Logger'; diff --git a/packages/cli/commands/webhook.ts b/packages/cli/commands/webhook.ts index 1600877cbe..97876e5235 100644 --- a/packages/cli/commands/webhook.ts +++ b/packages/cli/commands/webhook.ts @@ -20,8 +20,6 @@ import { GenericHelpers, LoadNodesAndCredentials, NodeTypes, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - TestWebhooks, WebhookServer, } from '../src'; diff --git a/packages/cli/commands/worker.ts b/packages/cli/commands/worker.ts index 32a7d24ccb..baacad83b9 100644 --- a/packages/cli/commands/worker.ts +++ b/packages/cli/commands/worker.ts @@ -12,21 +12,12 @@ import * as PCancelable from 'p-cancelable'; import { Command, flags } from '@oclif/command'; import { UserSettings, WorkflowExecute } from 'n8n-core'; -import { - IDataObject, - INodeTypes, - IRun, - IWorkflowExecuteHooks, - Workflow, - WorkflowHooks, - LoggerProxy, -} from 'n8n-workflow'; +import { INodeTypes, IRun, Workflow, LoggerProxy } from 'n8n-workflow'; import { FindOneOptions } from 'typeorm'; import * as Bull from 'bull'; import { - ActiveExecutions, CredentialsOverwrites, CredentialTypes, Db, @@ -39,7 +30,6 @@ import { LoadNodesAndCredentials, NodeTypes, ResponseHelper, - WorkflowCredentials, WorkflowExecuteAdditionalData, } from '../src'; @@ -203,7 +193,7 @@ export class Worker extends Command { Worker.runningJobs[job.id] = workflowRun; // Wait till the execution is finished - const runData = await workflowRun; + await workflowRun; delete Worker.runningJobs[job.id];