Add background job for deleting completed external service sync jobs
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
The function is run every hour by default.
Fixes #14048completed
or errored
which shouldn't happen a lot (a few times per second at most).