MongoDB uses a TTL index but PostgreSQL doesn't have this. We need to write a setInterval() that runs a query for completed/failed jobs and then manually diff the completed_at or failed_at value vs. the calculate date based on the passed completedAfterSeconds or failedAfterSeconds setting for the queue.
MongoDB uses a TTL index but PostgreSQL doesn't have this. We need to write a setInterval() that runs a query for completed/failed jobs and then manually diff the
completed_at
orfailed_at
value vs. the calculate date based on the passedcompletedAfterSeconds
orfailedAfterSeconds
setting for the queue.