mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
fix(core): Always set startedAt when executions start running (#11098)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3950cab6dd
commit
722f4a8b77
@@ -766,7 +766,7 @@ export async function getWorkflowData(
|
||||
/**
|
||||
* Executes the workflow with the given ID
|
||||
*/
|
||||
async function executeWorkflow(
|
||||
export async function executeWorkflow(
|
||||
workflowInfo: IExecuteWorkflowInfo,
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
options: ExecuteWorkflowOptions,
|
||||
@@ -798,7 +798,13 @@ async function executeWorkflow(
|
||||
const runData = options.loadedRunData ?? (await getRunData(workflowData, options.inputData));
|
||||
|
||||
const executionId = await activeExecutions.add(runData);
|
||||
await executionRepository.updateStatus(executionId, 'running');
|
||||
|
||||
/**
|
||||
* A subworkflow execution in queue mode is not enqueued, but rather runs in the
|
||||
* same worker process as the parent execution. Hence ensure the subworkflow
|
||||
* execution is marked as started as well.
|
||||
*/
|
||||
await executionRepository.setRunning(executionId);
|
||||
|
||||
Container.get(EventService).emit('workflow-pre-execute', { executionId, data: runData });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user