refactor: move ap retry queue from lru cache to db (#13568)

* refactor: move ap retry queue from lru cache to db

get rid of the setTimeouts that were running for 2months
retries will survive server restarts

* refactor: reduce exp. backoff
This commit is contained in:
Barış Uşaklı
2025-07-30 09:32:58 -04:00
committed by GitHub
parent 6fc8dfa940
commit b3a4a128cd
2 changed files with 94 additions and 62 deletions

View File

@@ -617,6 +617,8 @@ inbox.reject = async (req) => {
const queueId = `${type}:${id}:${hostname}`;
// stop retrying rejected requests
clearTimeout(activitypub.retryQueue.get(queueId));
activitypub.retryQueue.delete(queueId);
await Promise.all([
db.sortedSetRemove('ap:retry:queue', queueId),
db.delete(`ap:retry:queue:${queueId}`),
]);
};