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.1.13 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.12 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.12.rc1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.11 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.10 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.9 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.8 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.8.beta1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.7 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.7.beta1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.6 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.6.beta1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.5 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.4 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.3 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.2 lib/delayed/plugins/clear_locks.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.1/lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.1 lib/delayed/plugins/clear_locks.rb
delayed_job-4.1.0 lib/delayed/plugins/clear_locks.rb
delayed_job_tgmerritt-4.0.7 lib/delayed/plugins/clear_locks.rb