Skip to content

Commit

Permalink
Merge pull request #15069 from opf/chore/add-more-timeouts
Browse files Browse the repository at this point in the history
Set operation and request httpx timeouts.
  • Loading branch information
machisuji authored Mar 21, 2024
2 parents 8fa06c4 + 5eb8d11 commit f9c3220
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions config/constants/settings/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,20 @@ class Definition
allowed: (0..),
default: 3
},
httpx_operation_timeout: {
description: '',
format: :float,
writable: false,
allowed: (0..),
default: 10
},
httpx_request_timeout: {
description: '',
format: :float,
writable: false,
allowed: (0..),
default: 10
},
httpx_read_timeout: {
description: '',
format: :float,
Expand Down
2 changes: 2 additions & 0 deletions lib/open_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def self.httpx
.with(
timeout: {
connect_timeout: OpenProject::Configuration.httpx_connect_timeout,
operation_timeout: OpenProject::Configuration.httpx_operation_timeout,
request_timeout: OpenProject::Configuration.httpx_request_timeout,
write_timeout: OpenProject::Configuration.httpx_write_timeout,
read_timeout: OpenProject::Configuration.httpx_read_timeout,
keep_alive_timeout: OpenProject::Configuration.httpx_keep_alive_timeout
Expand Down

0 comments on commit f9c3220

Please sign in to comment.