From 0b226fb9e411eb0d63e02e82194854b1d10a01ab Mon Sep 17 00:00:00 2001 From: Gustavo Caso Date: Sun, 14 Apr 2019 22:22:47 -0400 Subject: [PATCH] use enqueue instead of retry_job to reenqueue jobs --- lib/job-iteration/iteration.rb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/job-iteration/iteration.rb b/lib/job-iteration/iteration.rb index 2ee33d9d..dff7a7a0 100644 --- a/lib/job-iteration/iteration.rb +++ b/lib/job-iteration/iteration.rb @@ -72,11 +72,6 @@ def perform(*params) # @private interruptible_perform(*params) end - def retry_job(*) - super unless @retried - @retried = true - end - private def enumerator_builder @@ -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