From f22ce860b50ee20fe447fe3a7dd33e87979b1e4b Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 24 Nov 2020 18:31:30 +0200 Subject: [PATCH] mongo tail --- swarmlab-app/src/run/app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index 5b69564..e2d1c8c 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -369,7 +369,13 @@ io.origins('*:*') // for latest version function onCollection(err, collection) { - var cursor = collection.find({}, { tailable: true, awaitdata: true }), + let options = { tailable: true, + awaitData: true, + numberOfRetries: -1, + tailableRetryInterval: 500 + }; + //collection.find().cursor(options); + var cursor = collection.find({}, options), cursorStream = cursor.stream(), itemsProcessed = 0;