fix: startup and funkwhale listening
This commit is contained in:
@@ -80,6 +80,33 @@ const patchSpecs = [
|
|||||||
throw err;
|
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`,
|
// Update stats cache after sync`,
|
||||||
candidates: [
|
candidates: [
|
||||||
"node_modules/@rmdes/indiekit-endpoint-funkwhale/lib/sync.js",
|
"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}"
|
export MONGO_AUTH_SOURCE="${MONGO_AUTH_SOURCE:-admin}"
|
||||||
fi
|
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.
|
# Force production runtime and keep debug logging disabled.
|
||||||
export NODE_ENV="production"
|
export NODE_ENV="production"
|
||||||
export INDIEKIT_DEBUG="0"
|
export INDIEKIT_DEBUG="0"
|
||||||
|
|||||||
Reference in New Issue
Block a user