fix: startup and funkwhale listening
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user