Skip to content

Wait for a selected export to finish

https://redmine.teklia.com/issues/7497

Requires #7 (closed)

When starting a CLI export from the frontend, users will have to either select an existing SQLite export or create a new one. When they choose to create a new export, an new CorpusExport is created and started, and the export process is immediately created before that SQLite export finishes.

When an export_id is specified, export workers should first check its state:

  • If it is created or running, they should wait and try again (perhaps with tenacity), and timeout after 2 hours (the default export job timeout).
  • If it is done, they can download and continue.
  • If it is error, they should show an error message and exit with an non-zero code.