Skip to content

Commit

Permalink
use enqueue instead of retry_job to reenqueue jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustavo Caso committed Apr 15, 2019
1 parent 55b4640 commit fc5657c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/job-iteration/iteration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,6 @@ def perform(*params) # @private
interruptible_perform(*params)
end

def retry_job(*)
super unless defined?(@retried) && @retried
@retried = true
end

private

def enumerator_builder
Expand Down Expand Up @@ -150,7 +145,9 @@ def reenqueue_iteration_job
self.times_interrupted += 1

self.already_in_queue = true if respond_to?(:already_in_queue=)
retry_job

enqueue unless @enqueued
@enqueued = true
end

def adjust_total_time
Expand Down

0 comments on commit fc5657c

Please sign in to comment.