Fix bulk indexing

This commit is contained in:
Chocobozzz 2024-01-04 15:37:00 +01:00
parent 69e17e2777
commit 9c43989b59
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 0 deletions

View File

@ -109,7 +109,11 @@ export abstract class AbstractIndexer <T extends IndexableDoc, DB> {
const elements = this.elementsToBulkIndex const elements = this.elementsToBulkIndex
this.elementsToBulkIndex = [] this.elementsToBulkIndex = []
logger.info(`Bulk indexing ${elements.length} elements in ${this.indexName}`)
this.bulkProcessEnqueuedTask = await this.indexElements(elements) this.bulkProcessEnqueuedTask = await this.indexElements(elements)
this.bulkIndexationTimer = undefined
} catch (err) { } catch (err) {
logger.error({ err }, 'Cannot schedule bulk indexation') logger.error({ err }, 'Cannot schedule bulk indexation')
} }