8017: mem-per-cpu
[arvados.git] / services / crunch-dispatch-slurm / crunch-finish-slurm.sh
index 2977e1c6ecd11fa2d3d7db05866adae64b63beba..95a37ba4ef4d37c3d7c26d639146d7920312834d 100755 (executable)
@@ -1,7 +1,8 @@
 #!/bin/sh
 
-# I wonder if it is possible to attach metadata to job records to look these
-# things up instead of having to provide it on the command line.
+# Script to be called by strigger when a job finishes.  This ensures the job
+# record has the correct state "Complete" even if the node running the job
+# failed.
 
 ARVADOS_API_HOST=$1
 ARVADOS_API_TOKEN=$2
@@ -9,6 +10,9 @@ ARVADOS_API_HOST_INSECURE=$3
 uuid=$4
 jobid=$5
 
+# If it is possible to attach metadata to job records we could look up the
+# above information instead of getting it on the command line.  For example,
+# this is the recipe for getting the job name (container uuid) from the job id.
 #uuid=$(squeue --jobs=$jobid --states=all --format=%j --noheader)
 
 export ARVADOS_API_HOST ARVADOS_API_TOKEN ARVADOS_API_HOST_INSECURE