Skip to content

Commit

Permalink
adapt timeout to load balancer
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum committed Dec 23, 2024
1 parent ee87304 commit d3d15d7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/dsp_tools/commands/ingest_xmlupload/bulk_ingest_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ def upload_file(
self,
filepath: Path,
) -> UploadFailure | None:
"""Uploads a file to the ingest server."""
"""
Uploads a file to the ingest server.
The load balancer on DSP servers currently has a timeout of 60s, so we need to use a timeout of 58s.
See https://github.com/dasch-swiss/dsp-tools/pull/1335/files#r1882508057
"""
timeout = 58
url = self._build_url_for_bulk_ingest_ingest_route(filepath)
headers = {"Content-Type": "application/octet-stream"}
timeout = 1000
err_msg = f"Failed to upload '{filepath}' to '{url}'."
try:
logger.debug(f"REQUEST: POST to {url}, timeout: {timeout}, headers: {headers}")
Expand Down

0 comments on commit d3d15d7

Please sign in to comment.