🤞
parent
d240e06a44
commit
f5f7875f88
|
@ -48,6 +48,13 @@ class Transport
|
|||
.bind("amq.topic", routing_key: "bot.*.resources_v0.#")
|
||||
end
|
||||
|
||||
def ping_channel
|
||||
@resource_channel ||= self.connection
|
||||
.create_channel
|
||||
.queue("resource_workers")
|
||||
.bind("amq.topic", routing_key: "bot.*.ping.#")
|
||||
end
|
||||
|
||||
def amqp_topic
|
||||
@amqp_topic ||= self
|
||||
.connection
|
||||
|
|
|
@ -10,10 +10,20 @@ require_relative "../app/lib/service_runner_base.rb"
|
|||
require_relative "../app/lib/service_runner_base.rb"
|
||||
|
||||
class RabbitWorker
|
||||
class FakePing
|
||||
def self.process(info, payl)
|
||||
puts "====================================="
|
||||
puts info
|
||||
puts payl
|
||||
puts "====================================="
|
||||
end
|
||||
end
|
||||
|
||||
WAIT = 3
|
||||
SERVICES = {
|
||||
log_channel: LogService,
|
||||
resource_channel: Resources::Service
|
||||
resource_channel: Resources::Service,
|
||||
ping_channel: FakePing
|
||||
}
|
||||
|
||||
def run_it!(chan, service)
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
"coveralls": "3.0.3",
|
||||
"enzyme": "3.9.0",
|
||||
"enzyme-adapter-react-16": "1.13.0",
|
||||
"farmbot": "github:RickCarlino/farmbot-js",
|
||||
"farmbot": "8.0.0-rc4",
|
||||
"farmbot-toastr": "1.0.3",
|
||||
"i18next": "15.1.1",
|
||||
"jest": "24.8.0",
|
||||
|
|
Loading…
Reference in New Issue