Class: ThinkingSphinx::Deltas::DeltaJob
- Inherits:
-
Object
- Object
- ThinkingSphinx::Deltas::DeltaJob
- Defined in:
- lib/thinking_sphinx/deltas/delayed_delta/delta_job.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
Instance Method Summary collapse
-
#initialize(index) ⇒ DeltaJob
constructor
A new instance of DeltaJob.
- #perform ⇒ Object
Constructor Details
#initialize(index) ⇒ DeltaJob
Returns a new instance of DeltaJob.
6 7 8 |
# File 'lib/thinking_sphinx/deltas/delayed_delta/delta_job.rb', line 6 def initialize(index) @index = index end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
4 5 6 |
# File 'lib/thinking_sphinx/deltas/delayed_delta/delta_job.rb', line 4 def index @index end |
Instance Method Details
#perform ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/thinking_sphinx/deltas/delayed_delta/delta_job.rb', line 10 def perform return true unless ThinkingSphinx.updates_enabled? && ThinkingSphinx.deltas_enabled? config = ThinkingSphinx::Configuration.instance client = Riddle::Client.new config.address, config.port output = `#{config.bin_path}indexer --config #{config.config_file} --rotate #{index}` puts output unless ThinkingSphinx.suppress_delta_output? true end |