Skip to content

Instantly share code, notes, and snippets.

@dbrandt
Last active December 23, 2015 17:19
Show Gist options
  • Save dbrandt/6667805 to your computer and use it in GitHub Desktop.
Save dbrandt/6667805 to your computer and use it in GitHub Desktop.
function restart_balancer() {
sh.stopBalancer();
while (sh.isBalancerRunning()) {
sleep(1000);
}
sh.startBalancer();
print("Balancer restarted at " + new ISODate() + ".");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment