Skip to content

Instantly share code, notes, and snippets.

@mushfiq
Created August 8, 2013 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mushfiq/6186677 to your computer and use it in GitHub Desktop.
Save mushfiq/6186677 to your computer and use it in GitHub Desktop.
function freeze_db() {
rc = db.runCommand({fsync: 1, lock: 1});
if (rc.ok == 1){
return 1;
} else {
return 0;
}
}
freeze_db();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment