I am trying to get long running queries (sec_running >= 5) from MongoDB using Python.
Though the command works fine from Mongo console, it throws error or not working as expected when executed using PyMongo. Can someone please guide me on this ?.
How can I execute the below code from Python ?.
db.currentOp({“secs_running”: {$gte: 5}})
I am able to execute “currentOp” using PyMongo, however not able filter for the “secs_running”.
Please help, Thanks in advance. !