Created
March 7, 2014 21:23
-
-
Save werkshy/9420418 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the autoscaler engine loop in a begin/rescue block | |
def start_autoscaler | |
@stopped = false | |
@heroku_manager = nil | |
while true do | |
begin | |
if @stopped | |
break | |
end | |
self.run_loop | |
sleep @interval | |
rescue SystemExit, Interrupt # purposeful quit, ctrl-c, kill signal etc | |
raise | |
rescue Exception => e # any other error | |
ErrorHandler.report(e) | |
sleep @interval | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment