lib/legion/process.rb in legionio-0.3.0 vs lib/legion/process.rb in legionio-0.3.1
- old
+ new
@@ -47,12 +47,10 @@
write_pid
trap_signals
until quit
sleep(1)
- if @options.key? :time_limit
- @quit = true if Time.now - start_time > @options[:time_limit]
- end
+ @quit = true if @options.key?(:time_limit) && Time.now - start_time > @options[:time_limit]
end
Legion::Logging.info('Legion is shutting down!')
Legion.shutdown
Legion::Logging.info('Legion has shutdown. Goodbye!')