Make sure oid_login_perm exists when setup is executed for an existing user
[arvados.git] / services / api / script / crunch-dispatch.rb
index 36358460303c8d806569367c76a158421b4c1563..9eb1c28cb2e3fa567a735f7b9556c57ba32e8f1f 100755 (executable)
@@ -309,7 +309,10 @@ class Dispatcher
     j_done[:wait_thr].value
 
     jobrecord = Job.find_by_uuid(job_done.uuid)
-    jobrecord.assert_finished
+    jobrecord.running = false
+    jobrecord.finished_at ||= Time.now,
+    # Don't set 'jobrecord.success = false' because if the job failed to run due to an
+    # issue with crunch-job or slurm, we want the job to stay in the queue.
     jobrecord.save!
 
     # Invalidate the per-job auth token