mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Data Forge] Restore queue.drain() (#188603)
This PR is a follow up to #187901 – It restores the `await queue.drain()` function call in the `createEvents()` method. Without the `queue.drain()` call, the script will run out of memory when indexing more than 24 hours of data because it will generate events faster than the queue can drain them and eventually run out of memory.
This commit is contained in:
parent
7b1dd6143d
commit
76f329dfb1
1 changed files with 1 additions and 0 deletions
|
@ -117,6 +117,7 @@ export async function createEvents(
|
|||
.flat();
|
||||
}
|
||||
await queue.push(events);
|
||||
await queue.drain();
|
||||
} else {
|
||||
logger.info({ took: 0, latency: 0, indexed: 0 }, 'Indexing 0 documents.');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue