feat(federation): Add config option to control automatic queue purge time

This commit is contained in:
Jesse Wierzbinski 2024-11-25 13:53:14 +01:00
parent 048dd6b0ab
commit 61b773ed11
No known key found for this signature in database
4 changed files with 132 additions and 2 deletions

View file

@ -104,7 +104,15 @@ export const deliveryWorker = new Worker<
}
}
},
{ connection },
{
connection,
removeOnComplete: {
age: config.queues.delivery.remove_on_complete,
},
removeOnFail: {
age: config.queues.delivery.remove_on_failure,
},
},
);
export const inboxWorker = new Worker<InboxJobData, Response, InboxJobType>(
@ -242,5 +250,13 @@ export const inboxWorker = new Worker<InboxJobData, Response, InboxJobType>(
}
}
},
{ connection, removeOnComplete: { count: 0 } },
{
connection,
removeOnComplete: {
age: config.queues.inbox.remove_on_complete,
},
removeOnFail: {
age: config.queues.inbox.remove_on_failure,
},
},
);