mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
🐛 Fixed batch sizing to work when batchSize = 1 (#1314)
This commit is contained in:
@@ -656,7 +656,7 @@ export class HttpRequest implements INodeType {
|
|||||||
if (itemIndex > 0 && options.batchSize as number >= 0 && options.batchInterval as number > 0) {
|
if (itemIndex > 0 && options.batchSize as number >= 0 && options.batchInterval as number > 0) {
|
||||||
// defaults batch size to 1 of it's set to 0
|
// defaults batch size to 1 of it's set to 0
|
||||||
const batchSize: number = options.batchSize as number > 0 ? options.batchSize as number : 1;
|
const batchSize: number = options.batchSize as number > 0 ? options.batchSize as number : 1;
|
||||||
if (itemIndex % batchSize === 1) {
|
if (itemIndex % batchSize === 0) {
|
||||||
await new Promise(resolve => setTimeout(resolve, options.batchInterval as number));
|
await new Promise(resolve => setTimeout(resolve, options.batchInterval as number));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user