lib/chicanery.rb in chicanery-0.0.3 vs lib/chicanery.rb in chicanery-0.0.4
- old
+ new
@@ -7,11 +7,11 @@
include Persistence
include Servers
include Handlers
include StateComparison
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
def execute *args
load args.shift
poll_period = args.shift
loop do
@@ -24,10 +24,10 @@
compare_jobs current_jobs, previous_state[:servers][server.name] if previous_state[:servers]
current_state[:servers][server.name] = current_jobs
end
run_handlers.each {|handler| handler.call current_state }
persist current_state
- exit unless poll_period
+ break unless poll_period
sleep poll_period.to_i
end
end
end
\ No newline at end of file