From 7bdf527ec932908564e9842bb47cebc675c83dbb Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 2 Oct 2019 18:15:24 +0200 Subject: [PATCH] feedback on drained queue --- server/utils/chainquery/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/utils/chainquery/index.js b/server/utils/chainquery/index.js index 04d4383..340c129 100644 --- a/server/utils/chainquery/index.js +++ b/server/utils/chainquery/index.js @@ -28,7 +28,11 @@ const eclient = new elasticsearch.Client({ stream: loggerStream, }, }); + const queue = new ElasticQueue({elastic: eclient}); +queue.on('drain', function () { + console.log('elasticsearch queue is drained'); +}); // Check that our syncState file exist. fileExists(path.join(appRoot.path, 'syncState.json'), (err, exists) => {