class RSpec::Sidekiq::NullStatus
Attributes
Public Class Methods
Source
# File lib/rspec/sidekiq/batch.rb, line 58 def initialize(bid = SecureRandom.hex(8), callbacks = []) @bid = bid @callbacks = callbacks end
Public Instance Methods
Source
# File lib/rspec/sidekiq/batch.rb, line 67 def join ::Sidekiq::Worker.drain_all @callbacks.each do |event, callback, options| if event != :success || failures == 0 case callback when Class callback.new.send("on_#{event}", self, options) when String klass, meth = callback.split('#') klass.constantize.new.send(meth, self, options) else raise ArgumentError, 'Unsupported callback notation' end end end end
Source
# File lib/rspec/sidekiq/batch.rb, line 85 def total ::Sidekiq::Worker.jobs.size end