refactor(core): Move instanceType to InstanceSettings (no-changelog) (#10640)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-16 13:37:14 +02:00
committed by GitHub
parent 50beefb658
commit 25c8a328a8
25 changed files with 85 additions and 89 deletions

View File

@@ -3,7 +3,7 @@
/* eslint-disable @typescript-eslint/no-shadow */
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { GlobalConfig } from '@n8n/config';
import { WorkflowExecute } from 'n8n-core';
import { InstanceSettings, WorkflowExecute } from 'n8n-core';
import type {
ExecutionError,
IDeferredPromise,
@@ -54,6 +54,7 @@ export class WorkflowRunner {
private readonly nodeTypes: NodeTypes,
private readonly permissionChecker: PermissionChecker,
private readonly eventService: EventService,
private readonly instanceSettings: InstanceSettings,
) {}
/** The process did error */
@@ -150,7 +151,7 @@ export class WorkflowRunner {
// since these calls are now done by the worker directly
if (
this.executionsMode !== 'queue' ||
config.getEnv('generic.instanceType') === 'worker' ||
this.instanceSettings.instanceType === 'worker' ||
data.executionMode === 'manual'
) {
const postExecutePromise = this.activeExecutions.getPostExecutePromise(executionId);