lib/rocket_job/worker.rb in rocketjob-3.0.0.rc1 vs lib/rocket_job/worker.rb in rocketjob-3.0.0.rc2
- old
+ new
@@ -30,20 +30,20 @@
def self.around_running(*filters, &blk)
set_callback(:running, :around, *filters, &blk)
end
- def initialize(id: 0, server_name: 'inline', inline: false, re_check_seconds: Config.instance.re_check_seconds, filter: nil)
+ def initialize(id: 0, server_name: 'inline:0', inline: false, re_check_seconds: Config.instance.re_check_seconds, filter: nil)
@id = id
@server_name = server_name
if defined?(Concurrent::JavaAtomicBoolean) || defined?(Concurrent::CAtomicBoolean)
@shutdown = Concurrent::AtomicBoolean.new(false)
else
@shutdown = false
end
@name = "#{server_name}:#{id}"
@thread = Thread.new { run } unless inline
- @re_check_seconds = re_check_seconds
+ @re_check_seconds = re_check_seconds || 60
@re_check_start = Time.now
@filter = filter || {}
@current_filter = @filter.dup
end