mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
👕 Fix lint issue
This commit is contained in:
parent
051598d30e
commit
b488ae8d3a
|
@ -108,7 +108,7 @@ export class ActiveExecutions {
|
|||
this.activeExecutions[executionId].process!.send({
|
||||
type: timeout ? timeout : 'stopExecution',
|
||||
});
|
||||
}, 1)
|
||||
}, 1);
|
||||
}
|
||||
} else {
|
||||
// Workflow is running in current process
|
||||
|
|
|
@ -486,9 +486,9 @@ class App {
|
|||
// Do not save when default got set
|
||||
delete newWorkflowData.settings.saveManualExecutions;
|
||||
}
|
||||
if (parseInt(newWorkflowData.settings.executionTimeout as string) === this.executionTimeout) {
|
||||
if (parseInt(newWorkflowData.settings.executionTimeout as string, 10) === this.executionTimeout) {
|
||||
// Do not save when default got set
|
||||
delete newWorkflowData.settings.executionTimeout
|
||||
delete newWorkflowData.settings.executionTimeout;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,14 +158,14 @@ export class WorkflowRunner {
|
|||
let executionTimeout: NodeJS.Timeout;
|
||||
let workflowTimeout = config.get('executions.timeout') as number > 0 && config.get('executions.timeout') as number; // initialize with default
|
||||
if (data.workflowData.settings && data.workflowData.settings.executionTimeout) {
|
||||
workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number // preference on workflow setting
|
||||
workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number; // preference on workflow setting
|
||||
}
|
||||
|
||||
if (workflowTimeout) {
|
||||
const timeout = Math.min(workflowTimeout, config.get('executions.maxTimeout') as number) * 1000; // as seconds
|
||||
executionTimeout = setTimeout(() => {
|
||||
this.activeExecutions.stopExecution(executionId, 'timeout')
|
||||
}, timeout)
|
||||
this.activeExecutions.stopExecution(executionId, 'timeout');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
workflowExecution.then((fullRunData) => {
|
||||
|
@ -174,7 +174,7 @@ export class WorkflowRunner {
|
|||
fullRunData.finished = false;
|
||||
}
|
||||
this.activeExecutions.remove(executionId, fullRunData);
|
||||
})
|
||||
});
|
||||
|
||||
return executionId;
|
||||
}
|
||||
|
@ -239,16 +239,16 @@ export class WorkflowRunner {
|
|||
let executionTimeout: NodeJS.Timeout;
|
||||
let workflowTimeout = config.get('executions.timeout') as number > 0 && config.get('executions.timeout') as number; // initialize with default
|
||||
if (data.workflowData.settings && data.workflowData.settings.executionTimeout) {
|
||||
workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number // preference on workflow setting
|
||||
workflowTimeout = data.workflowData.settings!.executionTimeout as number > 0 && data.workflowData.settings!.executionTimeout as number; // preference on workflow setting
|
||||
}
|
||||
|
||||
if (workflowTimeout) {
|
||||
const timeout = Math.min(workflowTimeout, config.get('executions.maxTimeout') as number) * 1000; // as seconds
|
||||
executionTimeout = setTimeout(() => {
|
||||
this.activeExecutions.stopExecution(executionId, 'timeout')
|
||||
this.activeExecutions.stopExecution(executionId, 'timeout');
|
||||
|
||||
executionTimeout = setTimeout(() => subprocess.kill(), Math.max(timeout * 0.2, 5000)) // minimum 5 seconds
|
||||
}, timeout)
|
||||
executionTimeout = setTimeout(() => subprocess.kill(), Math.max(timeout * 0.2, 5000)); // minimum 5 seconds
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ process.on('message', async (message: IProcessMessage) => {
|
|||
// Workflow started already executing
|
||||
runData = workflowRunner.workflowExecute.getFullRunData(workflowRunner.startedAt);
|
||||
|
||||
const timeOutError = message.type === 'timeout' ? { message: 'Workflow execution timed out!' } as IExecutionError : undefined
|
||||
const timeOutError = message.type === 'timeout' ? { message: 'Workflow execution timed out!' } as IExecutionError : undefined;
|
||||
|
||||
// If there is any data send it to parent process, if execution timedout add the error
|
||||
await workflowRunner.workflowExecute.processSuccessExecution(workflowRunner.startedAt, workflowRunner.workflow!, timeOutError);
|
||||
|
|
|
@ -122,15 +122,15 @@
|
|||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input-number size="small" v-model="timeoutHMS.hours" :min="0" placeholder="hours" type="number" class="el-input_inner"></el-input-number></br>
|
||||
<el-input-number size="small" v-model="timeoutHMS.hours" :min="0" placeholder="hours" type="number" class="el-input_inner"></el-input-number><br />
|
||||
<div class="timeout-setting-name">hours</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input-number size="small" v-model="timeoutHMS.minutes" :min="0" placeholder="minutes" type="number" class="el-input_inner"></el-input-number></br>
|
||||
<el-input-number size="small" v-model="timeoutHMS.minutes" :min="0" placeholder="minutes" type="number" class="el-input_inner"></el-input-number><br />
|
||||
<div class="timeout-setting-name">minutes</div>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-input-number size="small" v-model="timeoutHMS.seconds" :min="0" placeholder="seconds" type="number" class="el-input_inner"></el-input-number></br>
|
||||
<el-input-number size="small" v-model="timeoutHMS.seconds" :min="0" placeholder="seconds" type="number" class="el-input_inner"></el-input-number><br />
|
||||
<div class="timeout-setting-name">seconds</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
Loading…
Reference in a new issue