Sha256: 953406878b17b1f1a4d210943d255e1cec0304d0cbce77d392979e814711c3d3

Contents?: true

Size: 731 Bytes

Versions: 59

Compression:

Stored size: 731 Bytes

Contents

=begin
require "sidekiq/api"
module Auth
	module SidekiqUp
		## @param job_description[String]: a json representation of whatever job / arguments you wanted to pass into sidekiq, it is used to log an error in case sidekiq is down.
		## the determination of sidekiq begin down is done by checking if the queues hash is empty.
		## @return : yields the block called with this method in case the queues are not empty, otherwise the result of calling Rails.logger.error
		def self.sidekiq_running(job_description)
			stats = Sidekiq::Stats.new
			yield
			#yield unless stats.queues.empty?
			#Rails.logger.error("sidekiq could not do job because sidekiq was not started: #{job_description}") if stats.queues.empty?
		end
	end
end
=end

Version data entries

59 entries across 59 versions & 1 rubygems

Version Path
wordjelly-auth-1.6.0 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.9 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.8 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.7 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.6 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.5 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.4 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.3 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.2 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.1 lib/auth/sidekiq_up.rb
wordjelly-auth-1.5.0 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.9 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.8 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.7 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.6 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.5 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.4 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.3 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.2 lib/auth/sidekiq_up.rb
wordjelly-auth-1.4.0 lib/auth/sidekiq_up.rb