fix: rename cachedUrl to avoid conflict + AP parallelWorkers 5→2
Deploy Indiekit Server / deploy (push) Has been cancelled
Deploy Indiekit Server / deploy (push) Has been cancelled
patch-ap-account-lookup-cache-fallback: upstream fork already declares `const cachedUrl` in GET /api/v1/accounts/:id (fix: ap actor cache commit), causing a SyntaxError on deploy. Renamed to `actorCacheUrl` and added an upstream-fix guard to skip gracefully when the upstream version is present. indiekit.config.mjs: reduce AP parallelWorkers from 5 to 2 to lower steady-state memory usage on the node jail. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -402,7 +402,7 @@ export default {
|
||||
activityRetentionDays: 90,
|
||||
storeRawActivities: false,
|
||||
redisUrl,
|
||||
parallelWorkers: 5,
|
||||
parallelWorkers: 2,
|
||||
actorType: "Person",
|
||||
logLevel: activityPubLogLevel,
|
||||
debugDashboard: activityPubDebugDashboard,
|
||||
|
||||
@@ -33,10 +33,10 @@ const OLD_SNIPPET = ` return res.status(404).json({ error: "Record not found"
|
||||
// ─── GET /api/v1/accounts/:id/statuses ──────────────────────────────────────`;
|
||||
|
||||
const NEW_SNIPPET = ` // Check ap_actor_cache — populated by resolveRemoteAccount after search/lookup [patch] ap-account-lookup-cache-fallback
|
||||
const cachedUrl = getActorUrlFromId(id)
|
||||
const actorCacheUrl = getActorUrlFromId(id)
|
||||
|| (collections.ap_actor_cache ? (await collections.ap_actor_cache.findOne({ _id: id }))?.actorUrl : null);
|
||||
if (cachedUrl) {
|
||||
const remoteAccount = await resolveRemoteAccount(cachedUrl, pluginOptions, baseUrl, collections);
|
||||
if (actorCacheUrl) {
|
||||
const remoteAccount = await resolveRemoteAccount(actorCacheUrl, pluginOptions, baseUrl, collections);
|
||||
if (remoteAccount) return res.json(remoteAccount);
|
||||
}
|
||||
|
||||
@@ -73,6 +73,13 @@ for (const filePath of candidates) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Upstream may have already added a cachedUrl block in GET /api/v1/accounts/:id
|
||||
// (e.g. fix: ap actor cache commit). If so, the functionality is already present — skip.
|
||||
if (source.includes("const cachedUrl = getActorUrlFromId(id)")) {
|
||||
console.log(`[postinstall] patch-ap-account-lookup-cache-fallback: already fixed upstream in ${filePath}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!source.includes(OLD_SNIPPET)) {
|
||||
console.warn(
|
||||
`[postinstall] patch-ap-account-lookup-cache-fallback: target snippet not found in ${filePath} — skipping`,
|
||||
|
||||
Reference in New Issue
Block a user