mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Centralize CronJob management (#10033)
This commit is contained in:
committed by
GitHub
parent
36b314d031
commit
09f2cf9eaf
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user