mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: clearTimeout if item is evicted from cache
This commit is contained in:
@@ -348,7 +348,16 @@ ActivityPub.get = async (type, id, uri, options) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ActivityPub.retryQueue = lru({ name: 'activitypub-retry-queue', max: 4000, ttl: 1000 * 60 * 60 * 24 * 60 });
|
ActivityPub.retryQueue = lru({
|
||||||
|
name: 'activitypub-retry-queue',
|
||||||
|
max: 4000,
|
||||||
|
ttl: 1000 * 60 * 60 * 24 * 60,
|
||||||
|
dispose: (value) => {
|
||||||
|
if (value) {
|
||||||
|
clearTimeout(value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// handle clearing retry queue from another member of the cluster
|
// handle clearing retry queue from another member of the cluster
|
||||||
pubsub.on(`activitypub-retry-queue:lruCache:del`, (keys) => {
|
pubsub.on(`activitypub-retry-queue:lruCache:del`, (keys) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user