app/models/manager.rb
# The main method of this class:
The main method of this class.
The main method of this class .
def tend(options = {})
      EOL.log_call
      options[:max_runs] = 30
      batch ||= PublishBatch.new
      while resource = Resource.next && ! batch.complete?
        if paused?
          begin
            pause
          rescue EOL::Exceptions::HarvestPauseTimeExceeded => e
            EOL.log("Harvesting pause exceeded wait time, exiting.")
            return false
          end
        end
        EOL.log("Manager found resource #{resource.id} to harvest...",
          prefix: '@')
        batch.add(resource)
        resource.harvest
      end
      batch.publish
      optimize_solr_if_needed
    end
def tend ( options = { } ) EOL . log_call options [ :max_runs ] = 30 batch ||= PublishBatch . new while resource = Resource . next && ! batch . complete? if paused? begin pause rescue EOL :: Exceptions :: HarvestPauseTimeExceeded => e EOL . log ( "Harvesting pause exceeded wait time, exiting." ) return false end end EOL . log ( "Manager found resource #{resource.id} to harvest..." , prefix : '@' ) batch . add ( resource ) resource . harvest end batch . publish optimize_solr_if_needed end
The main method of this class:
The main method of this class :
options
<not_specific>