refactor(core): Centralize CronJob management (#10033)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-07-16 20:42:48 +02:00
committed by GitHub
parent 36b314d031
commit 09f2cf9eaf
18 changed files with 730 additions and 429 deletions

View File

@@ -58,6 +58,7 @@ import {
STARTING_NODE_TYPES,
} from './Constants';
import { ApplicationError } from './errors/application.error';
import { getGlobalState } from './GlobalState';
function dedupe<T>(arr: T[]): T[] {
return [...new Set(arr)];
@@ -94,6 +95,8 @@ export class Workflow {
settings: IWorkflowSettings;
readonly timezone: string;
// To save workflow specific static data like for example
// ids of registered webhooks of nodes
staticData: IDataObject;
@@ -151,6 +154,7 @@ export class Workflow {
});
this.settings = parameters.settings || {};
this.timezone = this.settings.timezone ?? getGlobalState().defaultTimezone;
this.expression = new Expression(this);
}