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