Skip to content

Cannot cancel a pending reindex job or delete a finished one

  1. Make sure the search feature is enabled on your instance.
  2. Kill either the RQ workers or Solr (sorry, no more renewable energy for you).
  3. Create a project, or pick one where you are an admin.
  4. Make the project indexable through the Django admin, and make sure at least one ElementType is indexable.
  5. Open the project information page, go to the Search tab and start a reindexation.
  6. Open the jobs modal from the small icon on the right of the navbar.
  7. Try to cancel the job if it is still pending, or delete the job if it has failed or finished.
  8. Admire the HTTP 404.
  9. Cry.

The RetrieveJob and DestroyJob endpoints expect an UUID as the job ID, but RQ really allows any arbitrary string. We are using custom job IDs to detect when a reindexation is already running and avoid starting a new one, so the job IDs for reindexations are f'reindex-{corpus.id}', which are not UUIDs. We should allow any string in that URL, even slashes!