fix: startup and funkwhale listening

This commit is contained in:
Sven
2026-03-31 13:01:50 +02:00
parent a55868be52
commit 6372a9f422
2 changed files with 27 additions and 5 deletions

View File

@@ -80,6 +80,33 @@ const patchSpecs = [
throw err;
}
// Update stats cache after sync`,
candidates: [
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/sync.js",
"node_modules/@indiekit/indiekit/node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/sync.js",
],
},
{
name: "funkwhale-sync-network-error-guard",
marker: "Cannot reach Funkwhale instance; skipping sync",
oldSnippet: ` throw err;
}
// Update stats cache after sync`,
newSnippet: ` const causeCode = String(err?.cause?.code || "");
if (
/fetch failed/i.test(message) ||
/ECONNREFUSED|ENOTFOUND|ETIMEDOUT/.test(causeCode)
) {
// Cannot reach Funkwhale instance; skipping sync
console.warn(
"[Funkwhale] Cannot reach Funkwhale instance; skipping sync. Check FUNKWHALE_INSTANCE is reachable."
);
return { synced: 0, error: "Network error" };
}
throw err;
}
// Update stats cache after sync`,
candidates: [
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/sync.js",

View File

@@ -30,11 +30,6 @@ if [ -z "${MONGO_URL:-}" ]; then
export MONGO_AUTH_SOURCE="${MONGO_AUTH_SOURCE:-admin}"
fi
if [ -z "${GH_CONTENT_TOKEN:-}" ] && [ -z "${GITHUB_TOKEN:-}" ]; then
echo "GH_CONTENT_TOKEN or GITHUB_TOKEN is required" >&2
exit 1
fi
# Force production runtime and keep debug logging disabled.
export NODE_ENV="production"
export INDIEKIT_DEBUG="0"