feat: fix watchtower manual run stuck states in both client and server
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 12s

This commit is contained in:
Kroonk
2026-05-21 18:25:27 +02:00
parent 76b7a96673
commit b3c1fbc9bd
3 changed files with 35 additions and 4 deletions

View File

@@ -461,12 +461,25 @@ async function getWatchtowerRun(runId) {
}
if (manualWatchtowerRuns.has(id)) {
return manualWatchtowerRuns.get(id);
const cached = manualWatchtowerRuns.get(id);
if (!cached.running) {
return cached;
}
}
try {
return await readWatchtowerRunContainer(id);
const livePayload = await readWatchtowerRunContainer(id);
manualWatchtowerRuns.set(id, livePayload);
if (!livePayload.running) {
removeContainer(id).catch(() => {});
}
return livePayload;
} catch (error) {
if (manualWatchtowerRuns.has(id)) {
return manualWatchtowerRuns.get(id);
}
error.statusCode = error.statusCode || 404;
throw error;
}