Sha256: ec073fafd2567e4ab909c1a550201d46c066694d3be047b8c2cead7ed07a3a0b

Contents?: true

Size: 317 Bytes

Versions: 34

Compression:

Stored size: 317 Bytes

Contents

module Delayed
  module Plugins
    class ClearLocks < Plugin
      callbacks do |lifecycle|
        lifecycle.around(:execute) do |worker, &block|
          begin
            block.call(worker)
          ensure
            Delayed::Job.clear_locks!(worker.name)
          end
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 4 rubygems

Version Path
delayed_job-4.0.6 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.5 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.4 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.3 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.2 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.0 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.0.beta2 lib/delayed/plugins/clear_locks.rb
delayed_job-4.0.0.beta1 lib/delayed/plugins/clear_locks.rb
delayed_job-3.0.5 lib/delayed/plugins/clear_locks.rb
delayed_job-3.0.4 lib/delayed/plugins/clear_locks.rb
drewda_delayed_job-3.0.3 lib/delayed/plugins/clear_locks.rb
delayed_job-3.0.3 lib/delayed/plugins/clear_locks.rb
delayed_job-3.0.2 lib/delayed/plugins/clear_locks.rb