Module: Hutch::Schedule
- Defined in:
- lib/hutch/schedule.rb,
lib/hutch/schedule/core.rb,
lib/hutch/schedule/version.rb
Overview
Hutch::Schedule, just an addon to deal with the schedule exchange. If you want use it, just do ‘Hutch::Schedule.connect(Hutch.broker)` to initialize it and then just use like Hutch to publish message `Hutch::Schedule.publish`
Defined Under Namespace
Classes: Core
Constant Summary collapse
- VERSION =
"0.4.5"
Class Method Summary collapse
Class Method Details
.connect ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/hutch/schedule.rb', line 19 def self.connect return if core.present? Hutch.connect unless Hutch.connected? @core = Hutch::Schedule::Core.new(Hutch.broker) @core.connect! ActiveJob::QueueAdapters::HutchAdapter.register_actice_job_classes if defined?(ActiveJob::QueueAdapters::HutchAdapter) end |
.core ⇒ Object
27 28 29 |
# File 'lib/hutch/schedule.rb', line 27 def self.core @core end |
.publish(*args) ⇒ Object
31 32 33 |
# File 'lib/hutch/schedule.rb', line 31 def self.publish(*args) core.publish(*args) end |