Skip to content

Commit

Permalink
Revert "fix: keep meta_id on_failure_retry callback if Resque::DirtyE…
Browse files Browse the repository at this point in the history
…xit occurred"

This reverts commit 1ff2f4e.
  • Loading branch information
ashalaev committed Sep 11, 2017
1 parent e68bf6f commit 3b55c58
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
12 changes: 0 additions & 12 deletions lib/resque/integration/unique.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ def self.extended(base)
base.singleton_class.class_eval do
alias_method_chain :enqueue, :check
end

if base.respond_to?(:on_failure_retry)
base.singleton_class.class_eval do
alias_method_chain(:on_failure_retry, :keep_meta_id)
end
end
end

module ClassMethods
Expand Down Expand Up @@ -119,12 +113,6 @@ def on_failure_lock(e, *args)
unlock(*args)
end

def on_failure_retry_with_keep_meta_id(e, *args)
@meta_id = args.first if e.is_a?(Resque::DirtyExit)

on_failure_retry_without_keep_meta_id(e, *args)
end

# Before dequeue check if job is running
def before_dequeue_lock(*args)
(meta_id = args.first) &&
Expand Down
7 changes: 0 additions & 7 deletions spec/resque/integration/unique_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,6 @@ class JobUniqueWithRetry
include Resque::Integration
extend Resque::Plugins::Retry

@retry_limit = 2
@retry_delay = 1
@retry_exceptions = [IOError]

unique do |foo_var, params|
params[:foo]
end
Expand All @@ -158,8 +154,5 @@ def self.execute(foo_var, params)

it do
expect { worker.unregister_worker }.not_to raise_error

expect(Resque::Failure.count).to eq 1
expect(Resque::Failure.all['exception']).to eq 'Resque::DirtyExit'
end
end

0 comments on commit 3b55c58

Please sign in to comment.