rabbit_jobs 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rabbit_jobs/publisher.rb +9 -0
- data/lib/rabbit_jobs/version.rb +1 -1
- data/rabbit_jobs.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43e6ebadd3d397552985fda60cd5a52a83fde2aa
|
4
|
+
data.tar.gz: 382a384672309bbc88a73caa3f091aa7499a9ed5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f65d7b759e44f7a3f41d41c566e2a2682e11bd7752a8b51851bcfc5ed3942bd5ddc024bca849cdf35629feccf2ea3bf2521c596083a41f3bbe0cd1e3992525b6
|
7
|
+
data.tar.gz: 1b41ee27e600e2608bf1de39a95ba0e7b5065d158ca5bbdb20b50f157a3028e02e1a747a3443cdffdf87d95f27c10e9d56f4a9e09720510b6c6fa198e511ecfd
|
@@ -24,6 +24,15 @@ module RabbitJobs
|
|
24
24
|
begin
|
25
25
|
exchange_opts = Configuration::DEFAULT_MESSAGE_PARAMS.merge(ex || {})
|
26
26
|
exchange_name = exchange_opts.delete(:name).to_s
|
27
|
+
|
28
|
+
exchange = connection.default_channel.exchange(exchange_name, passive: true)
|
29
|
+
exchange.on_return do |basic_deliver, properties, payload|
|
30
|
+
RJ.logger.error full_message: caller.join("\r\n"),
|
31
|
+
short_message: "AMQP ERROR: (#{basic_deliver[:reply_code]}) #{basic_deliver[:reply_text].to_s}. exchange: #{basic_deliver[:exchange]}, key: #{basic_deliver[:routing_key]}.",
|
32
|
+
_basic_deliver: basic_deliver.inspect, _properties: properties.inspect, _payload: payload.inspect
|
33
|
+
true
|
34
|
+
end
|
35
|
+
|
27
36
|
unless connection.default_channel.basic_publish(payload, exchange_name, routing_key, exchange_opts).connection.connected?
|
28
37
|
raise "Disconnected from #{RJ.config.server}. Connection status: #{connection.try(:status).inspect}"
|
29
38
|
end
|
data/lib/rabbit_jobs/version.rb
CHANGED
data/rabbit_jobs.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = RabbitJobs::VERSION
|
18
18
|
|
19
|
-
gem.add_dependency "bunny", "0
|
19
|
+
gem.add_dependency "bunny", "~> 1.0"
|
20
20
|
gem.add_dependency "rake"
|
21
21
|
gem.add_dependency "rufus-scheduler", "~> 2.0"
|
22
22
|
gem.add_dependency "rails", "~> 3.2"
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbit_jobs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Lazureykis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|