New django action for experiment deletion
We should add a new django admin action (https://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/) for treating Experiment objects in the BEAT django DB.
In case this action is clicked by the administrator, it allows him/her to:
- Delete the Experiment + all associated results
- Clean-up the cache from the experiment:
- Clean-up local cache entries in the Django DB
- Send a message to the scheduler to delete certain cache files (see biometric/beat.scheduler#10). Notice you don't need to cancel any experiment (in case they are running). The scheduler shall be able to handle this gracefully.
If another experiment shares cache files with the experiment being deleted, then:
- The cache files of that experiment are also cleaned-up
- The experiment is marked as "Pending", so the user can re-run it at a later stage (unless the experiment was also running, in which case it will be cancelled by the scheduler automatically).
We understand this is a rather drastic action, but may be required in case of severe cache corruption.