mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Stronger typing for workflow settings (no-changelog) (#5754)
This commit is contained in:
committed by
GitHub
parent
d33a1ac1e9
commit
c9d9069c0e
@@ -130,13 +130,10 @@ class WorkflowRunnerProcess {
|
||||
const license = Container.get(License);
|
||||
await license.init(instanceId);
|
||||
|
||||
// Start timeout for the execution
|
||||
let workflowTimeout = config.getEnv('executions.timeout'); // initialize with default
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
|
||||
if (this.data.workflowData.settings && this.data.workflowData.settings.executionTimeout) {
|
||||
workflowTimeout = this.data.workflowData.settings.executionTimeout as number; // preference on workflow setting
|
||||
}
|
||||
const workflowSettings = this.data.workflowData.settings ?? {};
|
||||
|
||||
// Start timeout for the execution
|
||||
let workflowTimeout = workflowSettings.executionTimeout ?? config.getEnv('executions.timeout'); // initialize with default
|
||||
if (workflowTimeout > 0) {
|
||||
workflowTimeout = Math.min(workflowTimeout, config.getEnv('executions.maxTimeout'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user