mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 08:20:36 +01:00
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:
@@ -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}`),
|
||||
]);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user