Update mosaic URL formatting to zero-pad scan IDs to 6 digits
This commit is contained in:
+4
-2
@@ -216,8 +216,10 @@ class MachineSession:
|
|||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
def mosaic_url(self, scan_id: int) -> str:
|
def mosaic_url(self, scan_id: int) -> str:
|
||||||
|
# The server stores scan directories zero-padded to 6 digits (e.g. 010700/).
|
||||||
|
# Scans with IDs >= 100000 are unaffected since they are already 6 digits.
|
||||||
return urljoin(
|
return urljoin(
|
||||||
self.image_base_url, f"RootView_Database/{scan_id}/mosaic.jpg"
|
self.image_base_url, f"RootView_Database/{scan_id:06d}/mosaic.jpg"
|
||||||
)
|
)
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -262,7 +264,7 @@ class MachineSession:
|
|||||||
):
|
):
|
||||||
sc = exc.response.status_code
|
sc = exc.response.status_code
|
||||||
if attempt < retries:
|
if attempt < retries:
|
||||||
log.debug(
|
log.warning(
|
||||||
"Attempt %d/%d failed %s: %s — retrying in %.0fs",
|
"Attempt %d/%d failed %s: %s — retrying in %.0fs",
|
||||||
attempt,
|
attempt,
|
||||||
retries,
|
retries,
|
||||||
|
|||||||
Reference in New Issue
Block a user