Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pymongo/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ def validate_collection(self, name_or_collection):
raise CollectionInvalid("%s invalid: %s" % (name, info))
return info

def current_op(self):
"""Get information on oeprations currently running
(same as: db.currentOp() in JavaScript console)
"""
return self['$cmd.sys.inprog'].find_one()

def profiling_level(self):
"""Get the database's current profiling level.

Expand Down