Silly git staging.
authorPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 20 Mar 2014 19:32:10 +0000 (15:32 -0400)
committerPeter Amstutz <peter.amstutz@curoverse.com>
Thu, 20 Mar 2014 19:32:10 +0000 (15:32 -0400)
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