Changeset 43273c9 in Klonkt
- Timestamp:
- 07/01/2026 06:38:05 PM (2 months ago)
- Branches:
- main
- Children:
- d18c60e
- Parents:
- dc41bef
- File:
-
- 1 edited
-
src/services/ActivityPubService.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/services/ActivityPubService.js
rdc41bef r43273c9 1840 1840 // Most replies reach us by delivery, but replies-to-replies that live on other servers and 1841 1841 // aren't addressed to us are missed. This pulls the AS2 `replies` collections of the replies 1842 // we DO have, caching any newly-found ones in ap_interactions. Bounded (depth/fetch caps), 1843 // polite (serial), PULL only, and stale-while-revalidate: it never runs in a page request — 1844 // the view renders from cache; a stale post kicks off a background refresh for the NEXT view. 1842 // we DO have, caching any newly-found ones in ap_interactions. 1843 // 1844 // Matches Mastodon's behaviour: ONE level per crawl (like its FetchRepliesService), not a deep 1845 // recursive walk. Deeper levels fill in incrementally across crawls — once a fetched reply is 1846 // cached it becomes a seed itself, so its own replies are pulled on a later view (Mastodon's 1847 // per-status cascade). Bounded + polite (serial), PULL only, and stale-while-revalidate: it 1848 // never runs in a page request — the view renders from cache; a stale post kicks off a 1849 // background refresh for the NEXT view. 1845 1850 const THREAD_TTL_MS = 15 * 60 * 1000; // don't re-crawl a post more than ~4×/hour 1846 const THREAD_MAX_DEPTH = 3; // replies-to-replies-to-replies1851 const THREAD_MAX_DEPTH = 1; // one hop per crawl (like Mastodon); deeper fills in over crawls 1847 1852 const THREAD_MAX_FETCHES = 30; // hard cap on remote GETs per crawl (be a good peer) 1848 1853 const _crawlingThreads = new Set(); // per-post in-flight lock (no stampede across views)
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)