fix: container volumes
Build and Publish Container / Publish Linux container (push) Successful in 4m4s
Build and Publish Container / Publish Linux container (push) Successful in 4m4s
This commit is contained in:
@@ -293,6 +293,18 @@ class RefreshService:
|
||||
result = self.runner.run_batch(
|
||||
batch, timeout_seconds=remaining
|
||||
)
|
||||
if result.status != "completed":
|
||||
logger.warning(
|
||||
"SteamCMD pass %d batch %d/%d finished with "
|
||||
"status=%s exit_code=%s after %.1fs. Output:\n%s",
|
||||
pass_number,
|
||||
pass_batch_number,
|
||||
len(batches),
|
||||
result.status,
|
||||
result.exit_code,
|
||||
result.elapsed_seconds,
|
||||
result.output_tail or "(no SteamCMD output)",
|
||||
)
|
||||
self.database.add_download_attempt(
|
||||
{
|
||||
"run_id": run_id,
|
||||
|
||||
@@ -116,6 +116,20 @@ class SteamCmdRunner:
|
||||
def available(self) -> bool:
|
||||
return self.executable_path() is not None
|
||||
|
||||
def ensure_workshop_writable(self) -> None:
|
||||
workshop_dir = self.content_dir.parent.parent
|
||||
try:
|
||||
workshop_dir.mkdir(parents=True, exist_ok=True)
|
||||
self.content_dir.mkdir(parents=True, exist_ok=True)
|
||||
probe = workshop_dir / ".progression-write-test"
|
||||
probe.write_text("ok", encoding="utf-8")
|
||||
probe.unlink()
|
||||
except OSError as error:
|
||||
raise PermissionError(
|
||||
f"SteamCMD Workshop directory is not writable: {workshop_dir}. "
|
||||
"Check the container volume ownership."
|
||||
) from error
|
||||
|
||||
def run_batch(
|
||||
self,
|
||||
workshop_ids: list[str],
|
||||
@@ -129,6 +143,7 @@ class SteamCmdRunner:
|
||||
invalid = [item for item in workshop_ids if not item.isdigit()]
|
||||
if invalid:
|
||||
raise ValueError(f"Invalid Workshop ids: {', '.join(invalid)}")
|
||||
self.ensure_workshop_writable()
|
||||
|
||||
command = [executable, "+login", "anonymous"]
|
||||
for workshop_id in workshop_ids:
|
||||
|
||||
Reference in New Issue
Block a user