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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01b64dc9a1dacb4d8c9bd59e049760bf13f64933
4
- data.tar.gz: 17681bfe86634638d2e50ff33140a44e89123977
3
+ metadata.gz: 43e6ebadd3d397552985fda60cd5a52a83fde2aa
4
+ data.tar.gz: 382a384672309bbc88a73caa3f091aa7499a9ed5
5
5
  SHA512:
6
- metadata.gz: 65c444a292677f156f2a9518bd1971e9d6da5ed9aecfabf024054dca25d9fe623d31d75065cb75602d31d1d851d9cdcee354b6443da98c3d92a8da1d0385d446
7
- data.tar.gz: 4dd5ac992c47ae2f1d39f6931fe584c658c25d6449f4f1ce7867751045a401f1e7f9e184ac2258dae6ad3a80a3a1569cbdf2dae054aa74f1a0ad923a9ae8a002
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
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module RabbitJobs
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
  end
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.9.1"
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.0
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-04 00:00:00.000000000 Z
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.9.1
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.9.1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement