amqp_notifier 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +4 -4
- data/Rakefile +2 -2
- data/amqp_notifier.gemspec +2 -2
- data/lib/amqp_notifier.rb +5 -1
- metadata +3 -3
data/README.rdoc
CHANGED
|
@@ -8,13 +8,13 @@ Run this command:
|
|
|
8
8
|
|
|
9
9
|
gem install amqp-notifier
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
If you want to get the lastest version, add:
|
|
12
12
|
|
|
13
|
-
gem "amqp_notifier",
|
|
13
|
+
gem "amqp_notifier", :git => "git://github.com/nosolopau/amqp_notifier.git"
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
To use this version, add this to your Gemfile:
|
|
16
16
|
|
|
17
|
-
gem "amqp_notifier", "0.0.
|
|
17
|
+
gem "amqp_notifier", "0.0.3", :git => "git://github.com/nosolopau/amqp_notifier.git"
|
|
18
18
|
|
|
19
19
|
== Use
|
|
20
20
|
|
data/Rakefile
CHANGED
|
@@ -2,11 +2,11 @@ require 'rubygems'
|
|
|
2
2
|
require 'rake'
|
|
3
3
|
require 'echoe'
|
|
4
4
|
|
|
5
|
-
Echoe.new('amqp_notifier', '0.0.
|
|
5
|
+
Echoe.new('amqp_notifier', '0.0.4') do |p|
|
|
6
6
|
p.description = "AMQP & Qusion helper class"
|
|
7
7
|
p.url = "http://nosolopau.com"
|
|
8
8
|
p.author = "Pau"
|
|
9
9
|
p.email = "pau@nosolopau.com"
|
|
10
10
|
p.ignore_pattern = ["tmp/*", "script/*"]
|
|
11
11
|
p.development_dependencies = []
|
|
12
|
-
end
|
|
12
|
+
end
|
data/amqp_notifier.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = %q{amqp_notifier}
|
|
5
|
-
s.version = "0.0.
|
|
5
|
+
s.version = "0.0.4"
|
|
6
6
|
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
|
8
8
|
s.authors = ["Pau"]
|
|
9
|
-
s.date = %q{2011-
|
|
9
|
+
s.date = %q{2011-05-02}
|
|
10
10
|
s.description = %q{AMQP & Qusion helper class}
|
|
11
11
|
s.email = %q{pau@nosolopau.com}
|
|
12
12
|
s.extra_rdoc_files = ["README.rdoc", "lib/amqp_notifier.rb"]
|
data/lib/amqp_notifier.rb
CHANGED
|
@@ -13,6 +13,8 @@ class AmqpNotifier
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def publish(key = '', message = '')
|
|
16
|
+
Rails.logger.error("#{key}:")
|
|
17
|
+
Rails.logger.error("#{message}")
|
|
16
18
|
Qusion.channel.topic(@exchange, @options).publish(message, :key => @key_prefix + key)
|
|
17
19
|
end
|
|
18
20
|
|
|
@@ -23,7 +25,9 @@ class AmqpNotifier
|
|
|
23
25
|
yield info, message
|
|
24
26
|
info.ack
|
|
25
27
|
break
|
|
26
|
-
rescue
|
|
28
|
+
rescue => e
|
|
29
|
+
Rails.logger.error("#{e.inspect}:")
|
|
30
|
+
Rails.logger.error("#{e.backtrace}")
|
|
27
31
|
if i == RETRIES
|
|
28
32
|
AmqpNotifier.new("#{@exchange}_errors").publish(key, message)
|
|
29
33
|
info.reject(:requeue => false)
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 0
|
|
8
|
-
-
|
|
9
|
-
version: 0.0.
|
|
8
|
+
- 4
|
|
9
|
+
version: 0.0.4
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Pau
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-
|
|
17
|
+
date: 2011-05-02 00:00:00 +02:00
|
|
18
18
|
default_executable:
|
|
19
19
|
dependencies: []
|
|
20
20
|
|