Add timeout state to BulkImport::ExportBatch and create a cron job to convert old started jobs.
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=500288) - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=500288) </details> <!--IssueSummary end--> The following discussion from !169122 should be addressed: - [ ] @rodrigo.tomonari started a [discussion](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169122#note_2162149756): (+2 comments) > **concern** > > If jobs die and `BulkImports::ExportBatch` remains in a `started` state indefinitely, no other exports will take place. :grimacing: > > Perhaps we need a cronjob worker to set the status to `timeout` after some time, wdyt? In the original MR a new scope `started_and_not_timed_out` has been created, to avoid the issue above. However, it would be good to also have a cron job to update the state of the batch to `timeout` to allow us to keep better track of jobs.
issue