forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1535 from S-H-GAMELINKS/update/sidekiq-7.3.2
Update Sidekiq v7.3.2
- Loading branch information
Showing
9 changed files
with
28 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,20 +26,6 @@ | |
end | ||
end | ||
|
||
shared_examples 'setting a namespace' do | ||
context 'when setting the `REDIS_NAMESPACE` variable' do | ||
around do |example| | ||
ClimateControl.modify REDIS_NAMESPACE: 'testns' do | ||
example.run | ||
end | ||
end | ||
|
||
it 'uses the value for the namespace' do | ||
expect(subject[:namespace]).to eq 'testns' | ||
end | ||
end | ||
end | ||
|
||
shared_examples 'secondary configuration' do |prefix| | ||
context "when no `#{prefix}_REDIS_` environment variables are present" do | ||
it 'uses the url from the base config' do | ||
|
@@ -170,7 +156,6 @@ | |
expect(subject).to eq({ | ||
url: 'redis://localhost:6379/0', | ||
driver: :hiredis, | ||
namespace: nil, | ||
}) | ||
end | ||
end | ||
|
@@ -186,7 +171,6 @@ | |
expect(subject).to eq({ | ||
url: 'redis::/[email protected]/2', | ||
driver: :hiredis, | ||
namespace: nil, | ||
}) | ||
end | ||
end | ||
|
@@ -202,13 +186,11 @@ | |
expect(subject).to eq({ | ||
url: 'redis://:[email protected]:3333/3', | ||
driver: :hiredis, | ||
namespace: nil, | ||
}) | ||
end | ||
end | ||
|
||
include_examples 'setting a different driver' | ||
include_examples 'setting a namespace' | ||
include_examples 'sentinel support' | ||
end | ||
|
||
|
@@ -217,7 +199,6 @@ | |
|
||
include_examples 'secondary configuration', 'SIDEKIQ' | ||
include_examples 'setting a different driver' | ||
include_examples 'setting a namespace' | ||
include_examples 'sentinel support', 'SIDEKIQ' | ||
end | ||
|
||
|
@@ -228,7 +209,6 @@ | |
expect(subject).to eq({ | ||
url: 'redis://localhost:6379/0', | ||
driver: :hiredis, | ||
namespace: 'cache', | ||
expires_in: 10.minutes, | ||
connect_timeout: 5, | ||
pool: { | ||
|
@@ -238,24 +218,6 @@ | |
}) | ||
end | ||
|
||
context 'when `REDIS_NAMESPACE` is not set' do | ||
it 'uses the `cache` namespace' do | ||
expect(subject[:namespace]).to eq 'cache' | ||
end | ||
end | ||
|
||
context 'when setting the `REDIS_NAMESPACE` variable' do | ||
around do |example| | ||
ClimateControl.modify REDIS_NAMESPACE: 'testns' do | ||
example.run | ||
end | ||
end | ||
|
||
it 'attaches the `_cache` postfix to the namespace' do | ||
expect(subject[:namespace]).to eq 'testns_cache' | ||
end | ||
end | ||
|
||
include_examples 'secondary configuration', 'CACHE' | ||
include_examples 'setting a different driver' | ||
include_examples 'sentinel support', 'CACHE' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters