lib/right_chimp/queue/ExecutionGroup.rb in right_chimp-1.1.2 vs lib/right_chimp/queue/ExecutionGroup.rb in right_chimp-1.1.3

- old
+ new

@@ -53,11 +53,11 @@ updated_queue = [] found_job = nil @queue.each do |job| if found_job || job.status == Executor::STATUS_HOLDING updated_queue.push(job) - else + elsif job.status == Executor::STATUS_NONE found_job = job end end @queue = updated_queue @time_start = Time.now if @time_start == nil @@ -198,15 +198,16 @@ # # Queue a held job by id # def queue(id) - Log.debug "Requeuing job id #{id}" + Log.debug "Queuing held job id #{id}" job = @jobs_by_id[id] job.owner = nil job.time_start = Time.now job.time_end = nil job.status = Executor::STATUS_NONE + self.push(job) end # # Requeue a job by id #