Skip to content
Snippets Groups Projects
Commit 897f5411 authored by Balasankar C's avatar Balasankar C
Browse files

Merge branch 'bvl-fix-request-duration-calculation' into 'master'

Handle worker timeouts configured as strings

Closes gitlab#198469

See merge request gitlab-org/omnibus-gitlab!3877
parents 77fe2379 ce97d577
No related branches found
No related tags found
No related merge requests found
---
title: Handle worker timeouts configured as strings
merge_request: 3877
author:
type: fixed
Loading
Loading
@@ -246,7 +246,7 @@ module GitlabRails # rubocop:disable Style/MultilineIfModifier
service = Services.enabled?('puma') ? 'puma' : 'unicorn'
user_config = Gitlab[service]
service_config = Gitlab['node']['gitlab'][service]
user_config['worker_timeout'] || service_config['worker_timeout']
(user_config['worker_timeout'] || service_config['worker_timeout']).to_i
end
end
end unless defined?(GitlabRails) # Prevent reloading during converge, so we can test
Loading
Loading
@@ -1970,10 +1970,11 @@ describe 'gitlab::gitlab-rails' do
using RSpec::Parameterized::TableSyntax
 
where(:web_worker, :configured_timeout, :expected_duration) do
:unicorn | nil | 57
:unicorn | 30 | 29
:puma | nil | 57
:puma | 120 | 114
:unicorn | nil | 57
:unicorn | 30 | 29
:unicorn | "30" | 29
:puma | nil | 57
:puma | 120 | 114
end
 
with_them do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment