-
Aishwarya Subramanian authored
Currently, lock files are used to determine the state of a project export. However, the lock files are not stored in a shared volume, causing the export states to be reported incorrectly. In order to fix this, we now store the export states in database as a more reliable mechanism. The table used is project_export_jobs. It stores the project_id, job_id and the current state. In addition to existing states, also added are two new states queued and regeneration_in_progress states. They are used to indicate a job that's waiting to be started and the case when a project export operation has been requested to be re-generated. Failed jobs are re-tried 3 times, after which the state is updated to failed. To account for jobs that get stuck, a cron job runs every hour to set the stuck jobs to failed state. Closes https://gitlab.com/gitlab-org/gitlab/issues/32203
a309861a