mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
feat(core): Implement lifecycle hooks to support streaming responses (no-changelog) (#16391)
This commit is contained in:
@@ -266,6 +266,15 @@ export class WorkflowRunner {
|
||||
this.activeExecutions.resolveResponsePromise(executionId, response);
|
||||
});
|
||||
|
||||
if (data.streamingEnabled) {
|
||||
if (data.executionMode !== 'manual') {
|
||||
lifecycleHooks.addHandler('sendChunk', (chunk) => {
|
||||
data.httpResponse?.write(JSON.stringify(chunk) + '\n');
|
||||
data.httpResponse?.flush?.();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
additionalData.setExecutionStatus = WorkflowExecuteAdditionalData.setExecutionStatus.bind({
|
||||
executionId,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user