#!/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
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