-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: CLI Module
-
None
-
Environment:OS:
node.js / npm versions:
Additional info:
-
5
-
Not Needed
-
Iteration Brontosaurus
Here's my test watch-script.js:
watchCursor = db.watch(); while (!watchCursor.isClosed()) { let next = watchCursor.tryNext() while (next !== null) { printjson(next); next = watchCursor.tryNext() } }
(This is taken from https://www.mongodb.com/docs/manual/reference/method/db.collection.watch/)
I ran it using:
mongosh {connection-string} watch-script.js
It prints new events on that db, but I can't exit the script with ctrl-c.