3 # Script to be called by strigger when a job finishes. This ensures the job
4 # record has the correct state "Complete" even if the node running the job
9 ARVADOS_API_HOST_INSECURE=$3
13 # If it is possible to attach metadata to job records we could look up the
14 # above information instead of getting it on the command line. For example,
15 # this is the recipe for getting the job name (container uuid) from the job id.
16 #uuid=$(squeue --jobs=$jobid --states=all --format=%j --noheader)
18 export ARVADOS_API_HOST ARVADOS_API_TOKEN ARVADOS_API_HOST_INSECURE
20 exec arv container update --uuid $uuid --container '{"state": "Complete"}'