nezu 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/nezu.rb +3 -4
- data/lib/nezu/runner.rb +3 -2
- data/lib/nezu/runtime.rb +0 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 335f63821b3b7dac7c6c02093a097dd307263840
|
4
|
+
data.tar.gz: 16e9158dc308f0d851aac9291229889d03b80638
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2bde51c36e2f21d4fe2ae9542322622370ff27d70a1564223d83f0cddf95a9c2780d12cab569344d9b07ee486f17605afb22e4aae6f6115cbd7ff8d2f3db85c5
|
7
|
+
data.tar.gz: 462c2cd4d82f21c1d684389e7835346f2dfc53a8e90395e1ee348605899a846d7bb9d7b719e6820eb055f3350eb3d9219d0aaf212ad6aa4a8433ff229691a92b
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.4
|
data/lib/nezu.rb
CHANGED
@@ -98,10 +98,9 @@ module Nezu
|
|
98
98
|
def formatted_msg
|
99
99
|
formatted_time = @time.strftime(TIME_FORMAT) << @time.usec.to_s[0..2].rjust(3)
|
100
100
|
if @msg.kind_of?(Exception)
|
101
|
-
"#{formatted_time} #{HOST} #{APP}[#{$$}][#{formatted_severity}] #{@msg.
|
102
|
-
@msg.backtrace.
|
103
|
-
|
104
|
-
end.join
|
101
|
+
msg = "#{formatted_time} #{HOST} #{APP}[#{$$}][#{formatted_severity}] #{@msg.to_s}\n"
|
102
|
+
bt = @msg.backtrace.reduce("") {|accu, bt_line| accu += "#{formatted_time} #{HOST} #{APP}[#{$$}][#{formatted_severity}] #{bt_line}\n"}
|
103
|
+
"#{msg}#{bt}"
|
105
104
|
elsif @msg.kind_of?(String)
|
106
105
|
"#{formatted_time} #{HOST} #{APP}[#{$$}][#{formatted_severity}] #{@msg.strip}\n"
|
107
106
|
else
|
data/lib/nezu/runner.rb
CHANGED
@@ -10,8 +10,9 @@ module Nezu
|
|
10
10
|
# this is the starting point for every application running with "$> nezu run"
|
11
11
|
# it get called from cli.rb
|
12
12
|
def self.start
|
13
|
-
|
14
|
-
|
13
|
+
amqp_config = Nezu::Config.amqp[Nezu.env.to_sym]
|
14
|
+
AMQP.start(amqp_config.url) do |connection, open_ok|
|
15
|
+
Nezu.logger.debug("[Nezu Runner] AMQP connection #{amqp_config.url}")
|
15
16
|
channel = AMQP::Channel.new(connection, :auto_recovery => true)
|
16
17
|
Nezu.logger.debug("[Nezu Runner] AMQP channel #{channel}")
|
17
18
|
Nezu::Runtime::Consumer.descendants.each do |consumer|
|
data/lib/nezu/runtime.rb
CHANGED
@@ -60,7 +60,6 @@ module Nezu
|
|
60
60
|
#
|
61
61
|
def inherited(subclass)
|
62
62
|
subclass.class_eval {cattr_accessor :queue_name} #:exchange_name?
|
63
|
-
#debugger
|
64
63
|
subclass.queue_name = ''
|
65
64
|
subclass.queue_name << "#{Nezu::Config.amqp[Nezu.env.to_sym].queue_prefix}." unless Nezu::Config.amqp[Nezu.env.to_sym].queue_prefix.nil?
|
66
65
|
subclass.queue_name << subclass.to_s.gsub(/^(Producers|Consumers)::/, '').gsub(/::/, '.').underscore
|