Skip to content

Commit 0170b9a

Browse files
authored
Increase client request timeout to 60s (#234)
The default request timeout is 5 seconds which can occasionally be hit for OpenStack API requests on certain clouds.
1 parent 3ec7c04 commit 0170b9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

capi_janitor/openstack/openstack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self, /, base_url, prefix=None, **kwargs):
136136
# Extract the path part of the base_url
137137
url = urllib.parse.urlsplit(base_url)
138138
# Initialise the client with the scheme/host
139-
super().__init__(base_url=f"{url.scheme}://{url.netloc}", **kwargs)
139+
super().__init__(base_url=f"{url.scheme}://{url.netloc}", timeout=60, **kwargs)
140140
# If another prefix is not given, use the path from the base URL as the prefix,
141141
# otherwise combine the prefixes and remove duplicated path sections.
142142
# This ensures things like pagination work nicely without duplicating the prefix

0 commit comments

Comments
 (0)