Flush documents in index

This commit is contained in:
simon987 2023-04-15 13:49:18 -04:00
parent 0710dc6d3d
commit a7e9b6af96

View File

@ -149,6 +149,11 @@ void worker_proc_cleanup(tpool_t *pool) {
if (ProcData.index_db != NULL) {
database_close(ProcData.index_db, FALSE);
}
if (IndexCtx.needs_es_connection) {
elastic_cleanup();
}
database_close(ProcData.ipc_db, FALSE);
}
@ -242,6 +247,7 @@ static void *tpool_worker(void *arg) {
pthread_mutex_lock(&pool->shm->mutex);
pthread_cond_signal(&pool->shm->done_working_cond);
pthread_mutex_unlock(&pool->shm->mutex);
worker_proc_cleanup(pool);
#endif
return NULL;