lib/sad/runner.rb in sad-1.5.17 vs lib/sad/runner.rb in sad-1.5.18
- old
+ new
@@ -20,9 +20,12 @@
count = (ENV['COUNT'] && ENV['COUNT'].to_i)
if count and count != 0
count.times do |t|
Daemons.run_proc("Sad-#{Sad::Config.queue(ENV['QUEUE'])}-#{t+1}", opts) do
+ # set interval
+ ::Sad::Config.interval = ENV['INTERVAL'].to_f if ENV['INTERVAL']
+
self.require_libs
self.show_info
::Sad.logger.reopen
EM.run{
Sad::Config.redis.send(:reconnect)
\ No newline at end of file