diff --git a/src/middleware/packages/activitypub/services/activitypub/subservices/outbox.js b/src/middleware/packages/activitypub/services/activitypub/subservices/outbox.js index 8d7932c98..ec690102b 100644 --- a/src/middleware/packages/activitypub/services/activitypub/subservices/outbox.js +++ b/src/middleware/packages/activitypub/services/activitypub/subservices/outbox.js @@ -9,6 +9,8 @@ const queueOptions = process.env.NODE_ENV === 'test' ? {} : { + // Keep completed jobs for 3 days + removeOnComplete: { age: 259200 }, // Try again after 3 minutes and until 48 hours later // Method to calculate it: Math.round((Math.pow(2, attemptsMade) - 1) * delay) attempts: 10, diff --git a/src/middleware/packages/activitypub/services/activitypub/subservices/side-effects.js b/src/middleware/packages/activitypub/services/activitypub/subservices/side-effects.js index 04daa95ca..892c83da6 100644 --- a/src/middleware/packages/activitypub/services/activitypub/subservices/side-effects.js +++ b/src/middleware/packages/activitypub/services/activitypub/subservices/side-effects.js @@ -36,7 +36,7 @@ module.exports = { 'processOutbox', activity.id, { activity }, - { removeOnComplete: { age: 2629800 } } // Keep completed jobs for one month + { removeOnComplete: { age: 259200 } } // Keep completed jobs for 3 days ); await job.finished(); @@ -52,7 +52,7 @@ module.exports = { 'processInbox', activity.id, { activity, recipients }, - { removeOnComplete: { age: 2629800 } } // Keep completed jobs for one month + { removeOnComplete: { age: 259200 } } // Keep completed jobs for 3 days ); await job.finished(); diff --git a/src/middleware/packages/solid/services/notifications/channels/webhook-channel.js b/src/middleware/packages/solid/services/notifications/channels/webhook-channel.js index f996b8aed..36f3e70f2 100644 --- a/src/middleware/packages/solid/services/notifications/channels/webhook-channel.js +++ b/src/middleware/packages/solid/services/notifications/channels/webhook-channel.js @@ -6,6 +6,8 @@ const queueOptions = process.env.NODE_ENV === 'test' ? {} : { + // Keep completed jobs for 3 days + removeOnComplete: { age: 259200 }, // Try again after 3 minutes and until 48 hours later // Method to calculate it: Math.round((Math.pow(2, attemptsMade) - 1) * delay) attempts: 10,