def process
      count = 0
      loop do
        entries = Entry.next_batch!(self)
        if entries.nil? || entries.empty?
          break if Entry.ready_count(self) == 0
        else
          batch = Batch.new(self, entries)
          if defined?(@batch_handler) && @batch_handler
            @batch_handler.call(batch)
          else
            batch.submit!
          end
          count += entries.select{|e| e.processed? }.size
        end
      end
      count
    end
def process
      count = 0
      loop do
        entries = Entry.next_batch!(self)
        if entries.nil? || entries.empty?
          break if Entry.ready_count(self) == 0
        else
          batch = Batch.new(self, entries)
          if defined?(@batch_handler) && @batch_handler
            @batch_handler.call(batch)
          else
            batch.submit!
          end
          count += entries.select{|e| e.processed? }.size
        end
      end
      count
    end
Process the queue. Exits when there are no more entries to process at the current time.
 Returns the number of entries processed.

 If any errors are encountered while processing the queue, they will be logged with the errors so they can
 be fixed and tried again later. However, if Solr is refusing connections, the processing is stopped right
 away and a Sunspot::IndexQueue::SolrNotResponding exception is raised.