Skip to content
Snippets Groups Projects
Commit 6e331efb authored by Geels, Brendan Ryan's avatar Geels, Brendan Ryan :tophat:
Browse files

It might be a good idea to actually use the timeout params...

parent fe594672
No related branches found
No related tags found
1 merge request!332Update metadata factory with timeouts and docstrings + use timeouts in instrument calibrations
......@@ -127,8 +127,7 @@ class MetadataFactory(object):
The Metadata object corresponding to the given ID.
"""
response = requests.get(
url=f"{self.url}/{id}",
headers=self._get_headers(),
url=f"{self.url}/{id}", headers=self._get_headers(), timeout=timeout
)
return Metadata(**response.json())
......@@ -155,6 +154,7 @@ class MetadataFactory(object):
url=self.url,
data=metadata.json(),
headers=self._get_headers(),
timeout=timeout,
)
return Metadata(**response.json())
......@@ -182,6 +182,7 @@ class MetadataFactory(object):
url=f"{self.url}/{metadata.id}",
data=metadata.json(),
headers=self._get_headers(),
timeout=timeout,
)
return Metadata(**response.json())
......
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