joystick
joystick copied to clipboard
Add cleanup script for PostgreSQL based queues to initializeDatabase
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.