mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Ensure that 'workflow-post-execute' event has userId whenever it's available (#13326)
This commit is contained in:
committed by
GitHub
parent
e3b7243377
commit
f41e353887
@@ -345,14 +345,7 @@ export class WorkflowRunner {
|
||||
try {
|
||||
job = await this.scalingService.addJob(jobData, { priority: realtime ? 50 : 100 });
|
||||
|
||||
lifecycleHooks = getLifecycleHooksForScalingMain(
|
||||
data.executionMode,
|
||||
executionId,
|
||||
data.workflowData,
|
||||
{
|
||||
retryOf: data.retryOf ?? undefined,
|
||||
},
|
||||
);
|
||||
lifecycleHooks = getLifecycleHooksForScalingMain(data, executionId);
|
||||
|
||||
// Normally also workflow should be supplied here but as it only used for sending
|
||||
// data to editor-UI is not needed.
|
||||
@@ -360,12 +353,7 @@ export class WorkflowRunner {
|
||||
} catch (error) {
|
||||
// We use "getLifecycleHooksForScalingWorker" as "getLifecycleHooksForScalingMain" does not contain the
|
||||
// "workflowExecuteAfter" which we require.
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(
|
||||
data.executionMode,
|
||||
executionId,
|
||||
data.workflowData,
|
||||
{ retryOf: data.retryOf ?? undefined },
|
||||
);
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(data, executionId);
|
||||
await this.processError(error, new Date(), data.executionMode, executionId, lifecycleHooks);
|
||||
throw error;
|
||||
}
|
||||
@@ -378,13 +366,7 @@ export class WorkflowRunner {
|
||||
|
||||
// We use "getLifecycleHooksForScalingWorker" as "getLifecycleHooksForScalingMain" does not contain the
|
||||
// "workflowExecuteAfter" which we require.
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(
|
||||
data.executionMode,
|
||||
executionId,
|
||||
data.workflowData,
|
||||
{ retryOf: data.retryOf ?? undefined },
|
||||
);
|
||||
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(data, executionId);
|
||||
const error = new ExecutionCancelledError(executionId);
|
||||
await this.processError(
|
||||
error,
|
||||
@@ -409,12 +391,7 @@ export class WorkflowRunner {
|
||||
|
||||
// We use "getLifecycleHooksForScalingWorker" as "getLifecycleHooksForScalingMain" does not contain the
|
||||
// "workflowExecuteAfter" which we require.
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(
|
||||
data.executionMode,
|
||||
executionId,
|
||||
data.workflowData,
|
||||
{ retryOf: data.retryOf ?? undefined },
|
||||
);
|
||||
const lifecycleHooks = getLifecycleHooksForScalingWorker(data, executionId);
|
||||
|
||||
await this.processError(
|
||||
error,
|
||||
|
||||
Reference in New Issue
Block a user