Skip to content

Add background job for deleting completed external service sync jobs

Administrator requested to merge cloud/cleanup-completed-jobs into main

Created by: asdine

This PR adds a trigger background job that deletes completed or errored jobs from the external_service_sync_jobs table. This table can potentially grow a lot with the number of user-added external services, this change makes sure it remains small. All the completed and errored jobs finished since more than one day are deleted automatically. The function is triggered whenever a job is marked as completed or errored which shouldn't happen a lot (a few times per second at most). The function is run every hour by default. Fixes #14048

Merge request reports

Loading