rabbit_jobs 0.8.16 → 0.8.17

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: 5ca4cb2de4c2817336808b85701b1427b94249f4
4
- data.tar.gz: 0c72264d374ce6ccab588e87c05fc8e88813642d
3
+ metadata.gz: 152a9a5a412e311f7d72e8fa4cf15efda5f6cd3d
4
+ data.tar.gz: 21a5b8aff6143b8c261216b4a29a0637aecd9e99
5
5
  SHA512:
6
- metadata.gz: 820dccff192800dcf5bc31c0f3f314057964316fd38f6868222d0dd03595befa327a0080f9b904c29cb27b1e1b30bb9fcec661544274bd35d07d9ae56836b7f1
7
- data.tar.gz: 6a3dc69a5bd093372079da867256d0b24502d3b4ace6c65ab32a1c681d6b83ed999ba032cb31499b23a6b94d443ad1350869b8558cf93fcb56d2feb1f64ad3d4
6
+ metadata.gz: 717cd68bc341aeba330938616699c98dc72f4af4704898a2e4995fb0d9bed0cb48f34474f78d19ae104d32f92e917bab21f005232b1db8285d163d5abb08382d
7
+ data.tar.gz: 468ef3ec40cf4a2b4b6be6715f1e44b55c0292161e9a1aaccf8e47f6a71546e2d5414d4c78101aa5adfa63f7cd19246ac037752174443612d60293a960cdb2f2
@@ -69,6 +69,14 @@ module RabbitJobs
69
69
  @data[name]
70
70
  end
71
71
 
72
+ def default_queue(value = nil)
73
+ if value
74
+ @default_queue = value.to_sym
75
+ else
76
+ @default_queue || RJ.config[:queues].keys.first || :jobs
77
+ end
78
+ end
79
+
72
80
  def mail_errors_to(email = nil)
73
81
  if email
74
82
  @data[:mail_errors_to] = email
@@ -127,7 +135,7 @@ module RabbitJobs
127
135
  yaml = parse_environment(yaml)
128
136
 
129
137
  @data = {queues: {}}
130
- %w(server mail_errors_to mail_errors_from).each do |m|
138
+ %w(server mail_errors_to mail_errors_from default_queue).each do |m|
131
139
  self.send(m, yaml[m])
132
140
  end
133
141
  yaml['queues'].each do |name, params|
@@ -125,7 +125,7 @@ module RabbitJobs
125
125
  end
126
126
 
127
127
  def perform_async(*args)
128
- RJ::Publisher.publish_to(@rj_queue || :jobs, self, *args)
128
+ RJ::Publisher.publish_to(@rj_queue || RJ.config.default_queue, self, *args)
129
129
  end
130
130
 
131
131
  def perform(*params)
@@ -1,5 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
3
  module RabbitJobs
4
- VERSION = "0.8.16"
4
+ VERSION = "0.8.17"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rabbit_jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.16
4
+ version: 0.8.17
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-07-24 00:00:00.000000000 Z
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.0.2
135
+ rubygems_version: 2.0.3
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Background jobs on RabbitMQ