Class: LucidWorks::Datasource::Status
- Defined in:
- lib/lucid_works/datasource/status.rb
Constant Summary collapse
- STOPPED_STATES =
%w{ IDLE STOPPED ABORTED EXCEPTION FINISHED UNKNOWN }
- POST_PROCESSING_STATES =
%w{ STOPPING ABORTING }
- CRAWLSTATES =
STOPPED_STATES + [ 'RUNNING' ] + POST_PROCESSING_STATES
Constants included from Utils::BoolConverter
Utils::BoolConverter::FALSE_VALUES, Utils::BoolConverter::TRUE_VALUES
Instance Attribute Summary
Attributes inherited from Base
#attributes, #id, #parent, #persisted, #raw_response, #response_data
Instance Method Summary collapse
Methods inherited from Base
all, collection_url, #collection_url, create, #destroy, extract_parent_from_options, find, first, human_attribute_value, #human_attribute_value, #initialize, #inspect, last, member_url, #member_url, #persisted?, #read_attribute_for_validation, #save, schema, singleton_name, to_select, #update_attributes
Methods included from SimpleNaming
Methods included from Utils::BoolConverter
Constructor Details
This class inherits a constructor from LucidWorks::Base
Instance Method Details
#doc_count ⇒ Object
38 39 40 |
# File 'lib/lucid_works/datasource/status.rb', line 38 def doc_count num_updated + num_new + num_unchanged end |
#elapsed_time ⇒ Object
42 43 44 |
# File 'lib/lucid_works/datasource/status.rb', line 42 def elapsed_time Time.now - crawl_started end |
#post_processing? ⇒ Boolean
34 35 36 |
# File 'lib/lucid_works/datasource/status.rb', line 34 def post_processing? POST_PROCESSING_STATES.include?(crawl_state) end |
#stopped? ⇒ Boolean
30 31 32 |
# File 'lib/lucid_works/datasource/status.rb', line 30 def stopped? STOPPED_STATES.include?(crawl_state) end |