Fix animdl discovery in Docker runtime
This commit is contained in:
+29
-2
@@ -1535,8 +1535,8 @@ class DownloadQueue:
|
||||
unavailable_methods.append(method)
|
||||
continue
|
||||
attempts.append(attempt_for(method))
|
||||
if not attempts:
|
||||
attempts.append(attempt_for(selected_methods[0]))
|
||||
if not attempts and selected_methods == ["ani-cli"]:
|
||||
attempts.append(attempt_for("ani-cli"))
|
||||
return attempts, selected_methods, unavailable_methods
|
||||
|
||||
def _run(self):
|
||||
@@ -1554,6 +1554,33 @@ class DownloadQueue:
|
||||
staging_dir.mkdir(parents=True, exist_ok=True)
|
||||
target_dir.mkdir(parents=True, exist_ok=True)
|
||||
attempts, selected_methods, unavailable_methods = self._command_attempts(job, staging_dir)
|
||||
if not attempts:
|
||||
with self.lock:
|
||||
job["status"] = "failed"
|
||||
job["started_at"] = now_iso()
|
||||
job["finished_at"] = job["started_at"]
|
||||
job["updated_at"] = job["finished_at"]
|
||||
job["exit_code"] = 1
|
||||
job["pid"] = None
|
||||
job["staging_dir"] = str(staging_dir)
|
||||
job["target_dir"] = str(target_dir)
|
||||
job["download_backend"] = selected_methods[0] if selected_methods else None
|
||||
job["fallback_used"] = False
|
||||
job["log"] = [
|
||||
f"Staging in: {job['staging_dir']}",
|
||||
f"Final folder: {job['target_dir']}",
|
||||
f"Download methods: {', '.join(selected_methods)}",
|
||||
(
|
||||
"No selected download methods are installed or executable: "
|
||||
f"{', '.join(unavailable_methods or selected_methods)}."
|
||||
),
|
||||
]
|
||||
self.current_process = None
|
||||
self.current_job_id = None
|
||||
self.current_job = None
|
||||
self._save_job_locked(job)
|
||||
self._cleanup_staging_dir(job)
|
||||
return
|
||||
primary_command = attempts[0]["command"]
|
||||
|
||||
with self.lock:
|
||||
|
||||
Reference in New Issue
Block a user