Module: TireAsyncIndex

Extended by:
TireAsyncIndex
Included in:
TireAsyncIndex
Defined in:
lib/tire_async_index.rb,
lib/tire_async_index/version.rb,
lib/tire_async_index/exceptions.rb,
lib/tire_async_index/configuration.rb

Defined Under Namespace

Classes: Configuration, EngineNotFound

Constant Summary collapse

VERSION =
"0.0.3"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configurationObject

Returns the value of attribute configuration.



7
8
9
# File 'lib/tire_async_index.rb', line 7

def configuration
  @configuration
end

Instance Method Details

#configure {|configuration| ... } ⇒ Object

Yields:



9
10
11
12
13
# File 'lib/tire_async_index.rb', line 9

def configure
  self.configuration ||= Configuration.new
  yield(configuration)
  reconfig_workers
end

#engineObject



19
20
21
# File 'lib/tire_async_index.rb', line 19

def engine
  self.configuration.engine
end

#queueObject



15
16
17
# File 'lib/tire_async_index.rb', line 15

def queue
  self.configuration.queue
end

#reconfig_workersObject



23
24
25
# File 'lib/tire_async_index.rb', line 23

def reconfig_workers
  SidekiqUpdateIndexWorker.sidekiq_options_hash["queue"] = TireAsyncIndex.queue if defined?(Sidekiq)
end