Skip to content

Commit 196916d

Browse files
committed
Disable timeouts to avoid httpx.ReadTimeout during large/slow uploads to BMA
1 parent 14fc0ac commit 196916d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/bma_client_lib/bma_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def _update_access_token(self) -> None:
101101
self.access_token = data["access_token"]
102102
logger.warning(f"got new access_token: {self.access_token}")
103103
self.auth = BmaBearerAuth(token=self.access_token)
104-
self.client = httpx.Client(auth=self.auth)
104+
self.client = httpx.Client(auth=self.auth, timeout=None)
105105

106106
def _download_job_source(self, job: Job) -> Path:
107107
"""Download the file needed to do a job."""
@@ -418,7 +418,6 @@ def upload_file(self, path: Path, attribution: str, file_license: str) -> dict[s
418418
self.base_url + "/api/v1/json/files/upload/",
419419
data={"file_metadata": json.dumps(data), "client": json.dumps(self.clientinfo)},
420420
files=files,
421-
timeout=30,
422421
)
423422
# create symlink to file in workdir
424423
workpath = self.path / r.json()["bma_response"]["links"]["downloads"]["original"][1:]

0 commit comments

Comments
 (0)