Some analyses incorrectly show spinners
This issue is probably related to sample rights.

Spinners are shown for some users, but not others when their rights on the samples are different.
diff --git a/virtool/jobs/nuvs.py b/virtool/jobs/nuvs.py
index e4fc8c98d..c36c23888 100644
--- a/virtool/jobs/nuvs.py
+++ b/virtool/jobs/nuvs.py
@@ -393,11 +393,20 @@ class Job(virtool.jobs.job.Job):
         self.dispatch("samples", "update", [sample_id])
 
     def cleanup(self):
+        self.db.analyses.delete_one({"_id": self.params["analysis_id"]})
+
         try:
             self.temp_dir.cleanup()
         except AttributeError:
             pass
 
-        virtool.db.sync.recalculate_algorithm_tags(self.db, self.params["sample_id"])
+        try:
+            shutil.rmtree(self.params["analysis_path"])
+        except FileNotFoundError:
+            pass
+
+        sample_id = self.params["sample_id"]
+
+        virtool.db.sync.recalculate_algorithm_tags(self.db, sample_id)
 
-        super().cleanup()
+        self.dispatch("samples", "update", [sample_id])
diff --git a/virtool/jobs/pathoscope.py b/virtool/jobs/pathoscope.py
index 0dfabbf0d..6ac9784b4 100644
--- a/virtool/jobs/pathoscope.py
+++ b/virtool/jobs/pathoscope.py
@@ -439,7 +439,11 @@ class Job(virtool.jobs.job.Job):
         except FileNotFoundError:
             pass
 
-        virtool.db.sync.recalculate_algorithm_tags(self.db, self.params["sample_id"])
+        sample_id = self.params["sample_id"]
+
+        virtool.db.sync.recalculate_algorithm_tags(self.db, sample_id)
+
+        self.dispatch("samples", "update", [sample_id])
 
     def cleanup_indexes(self):
         pass
['virtool/jobs/nuvs.py', 'virtool/jobs/pathoscope.py']