lib/qu/backend/mongo.rb
# Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure ( default : 5 )
def pop(queue = 'default')
        begin
          doc = with_connection_retries do
            jobs(queue).find_and_modify(:remove => true)
          end
          if doc
            doc['id'] = doc.delete('_id')
            return Payload.new(doc)
          end
        rescue ::Mongo::OperationFailure
        end
      end
def pop ( queue = 'default' ) begin doc = with_connection_retries do jobs ( queue ) . find_and_modify ( :remove => true ) end if doc doc [ 'id' ] = doc . delete ( '_id' ) return Payload . new ( doc ) end rescue :: Mongo :: OperationFailure end end
Number of times to retry connection on connection failure (default: 5)
Number of times to retry connection on connection failure ( default : 5 )
# No jobs in the queue (MongoDB <2)
queue
<not_specific>