Skip to content

Instantly share code, notes, and snippets.

@dagi3d
Created July 10, 2013 14:46
Show Gist options
  • Save dagi3d/5966926 to your computer and use it in GitHub Desktop.
Save dagi3d/5966926 to your computer and use it in GitHub Desktop.
lock and unlock database with moped
# lock the database
response = session.command(fsync: 1, lock: true)
# unlock
response = session["$cmd.sys.unlock"].find({}).first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment