Changeset b79466e in Klonkt for src/server.js


Ignore:
Timestamp:
06/26/2026 10:04:14 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
a404018
Parents:
14e2ce1
Message:

feat(fediverse): self-heal the timeline cache once per SELFHEAL_VERSION bump

selfHealTimeline() re-fetches cached ap_timeline notes and refreshes content +
media (recovers covers/edits delivered during a flux window, e.g. a fleet-wide
update) and drops gone (404/410) notes. Gated by a selfheal_version setting so it
runs ONCE after a SELFHEAL_VERSION bump, not on every boot. Async + bounded
(latest 200) like autoMigrateCircles. Closes prutfolio-src-5gl.

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/server.js

    r14e2ce1 rb79466e  
    5858import ogRoutes from './routes/og.js';
    5959import apRoutes from './routes/activitypub.js';
    60 import { apWants, startDeliveryWorker, autoMigrateCircles } from './services/ActivityPubService.js';
     60import { apWants, startDeliveryWorker, autoMigrateCircles, selfHealTimeline } from './services/ActivityPubService.js';
    6161
    6262// SESSION_SECRET: use the env var if set. Otherwise auto-generate a strong one
     
    162162startDeliveryWorker(); // retry failed fediverse deliveries with backoff
    163163autoMigrateCircles(); // one-time: convert legacy circle_links -> AP auto-boost follows
     164selfHealTimeline(); // once per SELFHEAL_VERSION bump: re-sync the fediverse cache (covers/edits) after a drastic update
    164165
    165166// Safety net: guarantee that there is always a primary site (solo/hub/circle).
Note: See TracChangeset for help on using the changeset viewer.