esp-commons 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/esp-commons/libraries/subscriber.rb +5 -5
- data/lib/esp-commons/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b54a5a37f15a1ef40fc91fe4947d734b1c3d4097
|
4
|
+
data.tar.gz: 1fe3d2b835d39901f9ae76fd6df6e3e316fe940c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89950bc41d015d0229eba9a967244a1bda0de7e131c372a479d35dd24ab2149bb9da7390ee64ab15b2b180386fb268ee3be6618c164e1668915b100002644227
|
7
|
+
data.tar.gz: f207375c1751a50ae78fb6b2d4e754dc4356dcf49c19bd6d400009cf2b17ef88a3977fca6a2635883ab4ee2d37669820b763d60a06a284acf855b23adb68d032
|
@@ -16,20 +16,20 @@ class Subscriber
|
|
16
16
|
queue.bind(exchange, :routing_key => "*").subscribe(:ack => true) do |header, message|
|
17
17
|
method = header.routing_key
|
18
18
|
message = JSON.parse(message)
|
19
|
-
logger.debug "#{subscriber.class} receive #{method}: #{message}"
|
19
|
+
logger.debug "DEBUG: #{Time.zone.now}: #{subscriber.class} receive #{method}: #{message}"
|
20
20
|
if subscriber.respond_to?(method)
|
21
21
|
begin
|
22
22
|
subscriber.send(method, *message)
|
23
|
-
logger.debug "#{subscriber.class} successfully executed #{method}"
|
23
|
+
logger.debug "DEBUG: #{Time.zone.now}: #{subscriber.class} successfully executed #{method}"
|
24
24
|
rescue => e
|
25
|
-
logger.warn "#{subscriber.class} error while executing #{method} - #{e.message}"
|
25
|
+
logger.warn "WARN: #{Time.zone.now}: #{subscriber.class} error while executing #{method} - #{e.message}"
|
26
26
|
end
|
27
27
|
else
|
28
|
-
logger.warn "#{subscriber.class} cann't execute #{method} due #{subscriber.class} not respond to #{method}"
|
28
|
+
logger.warn "WARN: #{Time.zone.now}: #{subscriber.class} cann't execute #{method} due #{subscriber.class} not respond to #{method}"
|
29
29
|
end
|
30
30
|
header.ack
|
31
31
|
end
|
32
|
-
logger.info "#{subscriber.class} listen #{queue.name}"
|
32
|
+
logger.info "INFO: #{Time.zone.now}: #{subscriber.class} listen #{queue.name}"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
data/lib/esp-commons/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esp-commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenTeam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.4.
|
164
|
+
rubygems_version: 2.4.8
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Summary of EspCommons.
|