Module: Sneakers::Laces
- Defined in:
- lib/sneakers/laces.rb,
lib/sneakers/laces/runner.rb,
lib/sneakers/laces/worker.rb,
lib/sneakers/laces/version.rb,
lib/sneakers/laces/configuration.rb,
lib/sneakers/laces/queue_manager.rb,
lib/sneakers/laces/reload_worker.rb,
lib/sneakers/laces/worker_manager.rb
Defined Under Namespace
Modules: Worker
Classes: Configuration, QueueManager, ReloadWorker, Runner, WorkerManager
Constant Summary
collapse
- VERSION =
'0.1.3'
Class Method Summary
collapse
Class Method Details
.api_client ⇒ Object
27
28
29
|
# File 'lib/sneakers/laces.rb', line 27
def api_client
@api_client ||= RabbitMQ::HTTP::Client.new(config.rabbitmq_api_endpoint)
end
|
.config ⇒ Object
18
19
20
|
# File 'lib/sneakers/laces.rb', line 18
def config
@config ||= Configuration.new
end
|
22
23
24
25
|
# File 'lib/sneakers/laces.rb', line 22
def configure
yield(config)
@api_client = nil
end
|
.reload(worker_tag:) ⇒ Object
31
32
33
|
# File 'lib/sneakers/laces.rb', line 31
def reload(worker_tag:)
Sneakers.publish('reload, please', routing_key: ReloadWorker.routing_key(worker_tag: worker_tag))
end
|