mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
perf(core): Batch items sent in runonceforeachitem mode (no-changelog) (#11870)
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
@@ -111,10 +111,11 @@ export class Code implements INodeType {
|
||||
if (runnersConfig.enabled && language === 'javaScript') {
|
||||
const code = this.getNodeParameter(codeParameterName, 0) as string;
|
||||
const sandbox = new JsTaskRunnerSandbox(code, nodeMode, workflowMode, this);
|
||||
const numInputItems = this.getInputData().length;
|
||||
|
||||
return nodeMode === 'runOnceForAllItems'
|
||||
? [await sandbox.runCodeAllItems()]
|
||||
: [await sandbox.runCodeForEachItem()];
|
||||
: [await sandbox.runCodeForEachItem(numInputItems)];
|
||||
}
|
||||
|
||||
const getSandbox = (index = 0) => {
|
||||
|
||||
Reference in New Issue
Block a user