Class: LucidWorks::Datasource::Status

Inherits:
Base
  • Object
show all
Defined in:
lib/lucid_works/datasource/status.rb

Constant Summary collapse

STOPPED_STATES =
%w{ IDLE STOPPED ABORTED EXCEPTION FINISHED }
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, #persisted?, #read_attribute_for_validation, #save, schema, singleton_name, to_select, #update_attributes

Methods included from SimpleNaming

#model_name

Methods included from Utils::BoolConverter

#to_bool

Constructor Details

This class inherits a constructor from LucidWorks::Base

Instance Method Details

#doc_countObject



37
38
39
# File 'lib/lucid_works/datasource/status.rb', line 37

def doc_count
  num_updated + num_new + num_unchanged
end

#elapsed_timeObject



41
42
43
# File 'lib/lucid_works/datasource/status.rb', line 41

def elapsed_time
  Time.now - crawl_started
end

#post_processing?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/lucid_works/datasource/status.rb', line 33

def post_processing?
  POST_PROCESSING_STATES.include?(crawl_state)
end

#stopped?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'lib/lucid_works/datasource/status.rb', line 29

def stopped?
  STOPPED_STATES.include?(crawl_state)
end