diff options
| author | mo khan <mo@mokhan.ca> | 2015-02-03 21:10:08 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-02-03 21:10:08 -0700 |
| commit | bab5e66e261774700eb3ad515eb929fc85991a69 (patch) | |
| tree | 64d52d6825bee7d50b580a7450f4f41cb8ee4f0d /lib | |
| parent | 59d4503063717dcb6e5eada94976e72c466483cc (diff) | |
poke disposition in worker.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/tasks/rabbitmq.rake | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/tasks/rabbitmq.rake b/lib/tasks/rabbitmq.rake index 185f993..42cfce9 100644 --- a/lib/tasks/rabbitmq.rake +++ b/lib/tasks/rabbitmq.rake @@ -6,13 +6,16 @@ namespace :rabbitmq do connection.start channel = connection.create_channel - # create exchange + # event intake bindings exchange = channel.fanout("malwer.events") - - # get or create queue (note the durable setting) queue = channel.queue("worker.events", durable: true) - # bind queue to exchange queue.bind("malwer.events") + + # poke bindings + exchange = channel.fanout("malwer.poke") + queue = channel.queue("worker.poke", durable: true) + queue.bind("malwer.poke") + connection.close end end |
