Yes, this is just step 1.
—
Sent from Mailbox for iPhone

On Thu, Apr 11, 2013 at 2:25 PM, Jonathan Hyman <notifications@github.com>
wrote:

>>  
>> -      while string = redis.rpoplpush("queue:#{queue}", tmp_queue)
>> -        decoded = coder.decode(string)
>> -        if decoded['class'] == klass && (args.empty? || decoded['args'] == args)
>> -          jobs.unshift new(queue, decoded)
>> -        end
>> -        redis.rpoplpush(tmp_queue, requeue_queue)
>> -      end
>> -      loop do
>> -        redis.rpoplpush(requeue_queue, "queue:#{queue}") or break
>> +      new_queue     = "queue:#{queue}"
>> +      temp_queue    = "queue:#{queue}:temp:#{Time.now.to_i}"
>> +      requeue_queue = "#{temp_queue}:requeue"
>> +
>> +      jobs = process_queue(new_queue, temp_queue, requeue_queue, coder, redis, klass, args) do |decoded|
> Can process_queue just yield the `new_queue`, `temp_queue`, and `requeue_queue` in the block? That way you can DRY up knowing how to construct the new/temp/requeuing queues in both places, and also lower the arg count on `process_queue`.
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/resque/resque/pull/937/files#r3762200