feat: better first time downloading, feat: more logging
Build and Publish Container / Publish Linux container (push) Successful in 4m59s

This commit is contained in:
2026-10-05 14:23:25 -04:00
parent fa6eb856dc
commit 86b8ab9c75
14 changed files with 504 additions and 70 deletions
+10 -2
View File
@@ -4,6 +4,7 @@ import re
import shutil
import subprocess
import time
from math import ceil
import xml.etree.ElementTree as ET
from dataclasses import dataclass
from datetime import datetime, timezone
@@ -115,7 +116,11 @@ class SteamCmdRunner:
def available(self) -> bool:
return self.executable_path() is not None
def run_batch(self, workshop_ids: list[str]) -> SteamCmdBatchResult:
def run_batch(
self,
workshop_ids: list[str],
timeout_seconds: float | None = None,
) -> SteamCmdBatchResult:
executable = self.executable_path()
if not executable:
raise FileNotFoundError(
@@ -142,6 +147,9 @@ class SteamCmdRunner:
exit_code: int | None = None
status = "completed"
output = ""
timeout = self.timeout_seconds
if timeout_seconds is not None:
timeout = max(1, min(timeout, ceil(timeout_seconds)))
try:
completed = subprocess.run(
command,
@@ -150,7 +158,7 @@ class SteamCmdRunner:
text=True,
encoding="utf-8",
errors="replace",
timeout=self.timeout_seconds,
timeout=timeout,
check=False,
shell=False,
)