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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0facc0719910164f924ccf5cb3316ee022efaf26
4
- data.tar.gz: 9137baf13eb7c0cfbef6102688c7db40b7d52c9e
3
+ metadata.gz: 335f63821b3b7dac7c6c02093a097dd307263840
4
+ data.tar.gz: 16e9158dc308f0d851aac9291229889d03b80638
5
5
  SHA512:
6
- metadata.gz: d805b97d0e38eff401150c10ebe0aba421b1a8e7b011e9cc0d540f8ed7a21a77cb148fa6d823e74f347c255a227c039e871ed7af25b8498c774318e41d19a035
7
- data.tar.gz: 2525e27c9c855603d3ebfc84720c2a7adf398f23fac35cdf7435676cb47d6dd717234faf5812cd9182c3a00c70fecb62eb005aad0b833acbeb02c9dd0289c27c
6
+ metadata.gz: 2bde51c36e2f21d4fe2ae9542322622370ff27d70a1564223d83f0cddf95a9c2780d12cab569344d9b07ee486f17605afb22e4aae6f6115cbd7ff8d2f3db85c5
7
+ data.tar.gz: 462c2cd4d82f21c1d684389e7835346f2dfc53a8e90395e1ee348605899a846d7bb9d7b719e6820eb055f3350eb3d9219d0aaf212ad6aa4a8433ff229691a92b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nezu (0.9.3)
4
+ nezu (0.9.4)
5
5
  activerecord
6
6
  activesupport
7
7
  amqp
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.3
1
+ 0.9.4
@@ -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.inspect}\n" +
102
- @msg.backtrace.map do |bt_line|
103
- "#{formatted_time} #{HOST} #{APP}[#{$$}][#{formatted_severity}] #{bt_line}\n"
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
@@ -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
- AMQP.start(Nezu::Config.amqp.send(Nezu.env.to_sym).url) do |connection, open_ok|
14
- Nezu.logger.debug("[Nezu Runner] AMQP connection #{Nezu::Config.amqp.send(Nezu.env.to_sym).url}")
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|
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nezu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sascha Teske