istox 0.1.70 → 0.1.71

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89b3db415a5272d141d30a598022f9e6158fef4ed9b487d673a603f3c8791a01
4
- data.tar.gz: 1a9af111874d3be165e6e26d723a7be408167abcaa31b2c847d83e84c9dea2a6
3
+ metadata.gz: 69033a8f25d30221966588ac8e9fd5fc434248a0d6df329d1875bc8386e21883
4
+ data.tar.gz: 6411cc37f7fb8306edc7ebda4d9592db1fc7a1263f194eb89085074e718dcbb0
5
5
  SHA512:
6
- metadata.gz: f3f5901e1d8e8d9a4bce640c37cf4a1266648a9cd2f59c10a3904ec1cb36687a925915e37e22e623cd6e97b335697ed1939d7822e69facce3458c619a772d249
7
- data.tar.gz: 0561fad0e9f67602cc9a6bee7e884bb3a81473c0f9f39c9b2d362b7e4696cb0257d7182d32e34ae2b1bb4ecaf8df051b2b17a1c9652d98d8ed920f5fcc57927b
6
+ metadata.gz: 78f2d321f16219dcb434dd635561fdc8c58ed517ae28d424b51131a92dc7951a9324f1bf60f96e6aea1f581da6dbd27cd9e570ab0784e236a69327a7d8affe34
7
+ data.tar.gz: c8b75fd04794cfe8ea2b44db2e402c9aea81260f98900d05ab74e81ceb52c8d9bbaa9c36fbd957ea97b3fc9d337c095e1b7c2eeeb3e92fed6c58434e2ecf554f
@@ -1,7 +1,7 @@
1
1
  module Istox
2
2
  class Publisher
3
3
  class << self
4
-
4
+
5
5
  def initialize!(amqp_config_path)
6
6
  @@amqp_config_path = amqp_config_path
7
7
  end
@@ -17,6 +17,17 @@ module Istox
17
17
  end
18
18
  end
19
19
 
20
+ def publish_to_fanout(exchange, routing_key, message)
21
+ Rails.logger.info 'Before publish retrieve data..'
22
+ durable = data.fetch('publish')[exchange]['durable']
23
+ Rails.logger.info "Publishing message: #{message} with exchange: #{exchange} routing key: #{routing_key}"
24
+ enqueue do
25
+ $channel
26
+ .fanout(exchange, durable: durable)
27
+ .publish(message.to_json, routing_key: routing_key, durable: durable)
28
+ end
29
+ end
30
+
20
31
  private
21
32
 
22
33
  def enqueue
@@ -33,4 +44,4 @@ module Istox
33
44
  end
34
45
  end
35
46
  end
36
- end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = "0.1.70"
2
+ VERSION = "0.1.71"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.70
4
+ version: 0.1.71
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-18 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
316
316
  version: '0'
317
317
  requirements: []
318
318
  rubyforge_project:
319
- rubygems_version: 2.7.7
319
+ rubygems_version: 2.7.8
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: istox backend shared gem