Skip to content

Instantly share code, notes, and snippets.

@droot
Created May 2, 2010 15:57
Show Gist options
  • Save droot/387231 to your computer and use it in GitHub Desktop.
Save droot/387231 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