shoryuken 5.2.1 → 5.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/shoryuken/environment_loader.rb +2 -0
- data/lib/shoryuken/version.rb +1 -1
- data/spec/shoryuken/environment_loader_spec.rb +22 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32f81ad9c6c98fde2b6056ba4675787369e6a324652913ca0250a3c721f6940a
|
4
|
+
data.tar.gz: e7cd7dc155525904147b89bcdb6ffa8e984459d8553c0b53aae7f74ceaf4dcb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8fc8971739f98a6107f7bc9dd47a35082ae7dfbf21e3bc2f57827fa3466a923cff49f92576b99642a64351eca80511ed29d6ace8a49063131e30d905424c4af
|
7
|
+
data.tar.gz: b8b11252d270c00cae4d8ca87949aebb93aef83411767def3adb6651ba6707a4f9964fc4c968e6ddf469f68cf51bc9f474961c31e074da70319626e6fe4d2dc9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [v5.2.2] - 2021-06-22
|
2
|
+
|
3
|
+
- When using ActiveJob queue name prefixing, avoid applying prefix to queues configured with a URL or ARN
|
4
|
+
- [#667](https://github.com/ruby-shoryuken/shoryuken/pull/667)
|
5
|
+
|
1
6
|
## [v5.2.1] - 2021-04-06
|
2
7
|
|
3
8
|
- Reduce message batch sizes in `shoryuken sqs requeue` and `shoryuken sqs mv` commands
|
@@ -80,6 +80,8 @@ module Shoryuken
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def prefix_active_job_queue_name(queue_name, weight)
|
83
|
+
return [queue_name, weight] if queue_name.start_with?('https://', 'arn:')
|
84
|
+
|
83
85
|
queue_name_prefix = ::ActiveJob::Base.queue_name_prefix
|
84
86
|
queue_name_delimiter = ::ActiveJob::Base.queue_name_delimiter
|
85
87
|
|
data/lib/shoryuken/version.rb
CHANGED
@@ -57,11 +57,11 @@ RSpec.describe Shoryuken::EnvironmentLoader do
|
|
57
57
|
ActiveJob::Base.queue_name_delimiter = '_'
|
58
58
|
|
59
59
|
allow(Shoryuken).to receive(:active_job?).and_return(true)
|
60
|
-
end
|
61
60
|
|
62
|
-
specify do
|
63
61
|
Shoryuken.active_job_queue_name_prefixing = true
|
62
|
+
end
|
64
63
|
|
64
|
+
specify do
|
65
65
|
Shoryuken.options[:queues] = ['queue1', ['queue2', 2]]
|
66
66
|
|
67
67
|
Shoryuken.options[:groups] = {
|
@@ -73,6 +73,26 @@ RSpec.describe Shoryuken::EnvironmentLoader do
|
|
73
73
|
expect(Shoryuken.groups['default'][:queues]).to eq(%w[test_queue1 test_queue2 test_queue2])
|
74
74
|
expect(Shoryuken.groups['group1'][:queues]).to eq(%w[test_group1_queue1 test_group1_queue2])
|
75
75
|
end
|
76
|
+
|
77
|
+
it 'does not prefix url-based queues' do
|
78
|
+
Shoryuken.options[:queues] = ['https://example.com/test_queue1']
|
79
|
+
Shoryuken.options[:groups] = {'group1' => {queues: ['https://example.com/test_group1_queue1']}}
|
80
|
+
|
81
|
+
subject.load
|
82
|
+
|
83
|
+
expect(Shoryuken.groups['default'][:queues]).to(eq(['https://example.com/test_queue1']))
|
84
|
+
expect(Shoryuken.groups['group1'][:queues]).to(eq(['https://example.com/test_group1_queue1']))
|
85
|
+
end
|
86
|
+
|
87
|
+
it 'does not prefix arn-based queues' do
|
88
|
+
Shoryuken.options[:queues] = ['arn:aws:sqs:fake-region-1:1234:test_queue1']
|
89
|
+
Shoryuken.options[:groups] = {'group1' => {queues: ['arn:aws:sqs:fake-region-1:1234:test_group1_queue1']}}
|
90
|
+
|
91
|
+
subject.load
|
92
|
+
|
93
|
+
expect(Shoryuken.groups['default'][:queues]).to(eq(['arn:aws:sqs:fake-region-1:1234:test_queue1']))
|
94
|
+
expect(Shoryuken.groups['group1'][:queues]).to(eq(['arn:aws:sqs:fake-region-1:1234:test_group1_queue1']))
|
95
|
+
end
|
76
96
|
end
|
77
97
|
describe "#setup_options" do
|
78
98
|
let (:cli_queues) { { "queue1"=> 10, "queue2" => 20 } }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoryuken
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.2.
|
4
|
+
version: 5.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Cantero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|