From 231064a5b467ba09a5b60325680f5a4209c3a80f Mon Sep 17 00:00:00 2001 From: zeus Date: Tue, 24 Nov 2020 19:08:44 +0200 Subject: [PATCH] mongo tail --- swarmlab-app/src/run/app.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/swarmlab-app/src/run/app.js b/swarmlab-app/src/run/app.js index a47746e..c8c5852 100755 --- a/swarmlab-app/src/run/app.js +++ b/swarmlab-app/src/run/app.js @@ -386,10 +386,11 @@ function onCollection(err, collection) { }); var cursor1 = collection.find({},options); - console.log(JSON.stringify(cursor1)) + console.log(JSON.stringify(cursor1.value)) + setInterval(function () { - var cursor2 = collection.find({},options); - console.log(JSON.stringify(cursor1)) + var cursor2 = collection.find({},options); + console.log(JSON.stringify(cursor2.value)) console.log('itemsProcessed', itemsProcessed); }, 1000); }