Skip to content
代码片段 群组 项目
未验证 提交 82e37f31 编辑于 作者: Heinrich Lee Yu's avatar Heinrich Lee Yu 提交者: GitLab
浏览文件

Merge branch 'sh-update-sidekiq-reliable-fetch-timeout' into 'master'

Increase DEFAULT_SEMI_RELIABLE_FETCH_TIMEOUT to 5 seconds

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139583



Merged-by: default avatarHeinrich Lee Yu <heinrich@gitlab.com>
Approved-by: default avatarHeinrich Lee Yu <heinrich@gitlab.com>
Co-authored-by: default avatarStan Hu <stanhu@gmail.com>
No related branches found
No related tags found
无相关合并请求
......@@ -5,7 +5,7 @@ class SemiReliableFetch < BaseReliableFetch
# We want the fetch operation to timeout every few seconds so the thread
# can check if the process is shutting down. This constant is only used
# for semi-reliable fetch.
DEFAULT_SEMI_RELIABLE_FETCH_TIMEOUT = 2 # seconds
DEFAULT_SEMI_RELIABLE_FETCH_TIMEOUT = 5 # seconds
def initialize(options)
super
......
......@@ -21,7 +21,7 @@
it 'brpops with the default timeout timeout' do
Sidekiq.redis do |connection|
expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 2 }).once.and_call_original
expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 5 }).once.and_call_original
fetcher.retrieve_work
end
......@@ -29,11 +29,11 @@
end
context 'when the timeout is set in the env' do
let(:timeout) { '5' }
let(:timeout) { '6' }
it 'brpops with the default timeout timeout' do
Sidekiq.redis do |connection|
expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 5 }).once.and_call_original
expect(connection).to receive(:brpop).with("queue:stuff_to_do", { timeout: 6 }).once.and_call_original
fetcher.retrieve_work
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册