jobrecord = Job.find_by_uuid(job_done.uuid)
jobrecord.running = false
- if jobrecord.finished_at == nil
- jobrecord.finished_at = Time.now
- end
+ 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
j_done[:job_auth].update_attributes expires_at: Time.now
end
end
-
-
protected
def did_recently(thing, min_interval)