Sha256: 4f8c3084718deaf43dae264f5f37f3e8786d4d285b395193042dcb4d02dad447

Contents?: true

Size: 457 Bytes

Versions: 9

Compression:

Stored size: 457 Bytes

Contents

module SidekiqBus
  module Middleware
    module Client
     
      # ensure sidekiq will retry jobs even when they are enqueued via other adapters
      class Retry
       def call(worker_class, job, queue, redis_pool)
         if job['class'] == 'QueueBus::Worker'
          job['retry'] = true unless job.has_key?('retry')
          job['backtrace'] = true unless job.has_key?('backtrace')
         end
         yield
       end
     end

   end
 end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sidekiq-bus-0.8.1 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.8.0 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.7.0 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.6.3 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.6.2 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.6.1 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.6.0 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.5.10 lib/sidekiq_bus/middleware/retry.rb
sidekiq-bus-0.5.9 lib/sidekiq_bus/middleware/retry.rb