Skip to content
Snippets Groups Projects
Commit b80c5110 authored by Benjamin Wingfield's avatar Benjamin Wingfield
Browse files

set up callback

parent 9126f8b7
No related branches found
No related tags found
No related merge requests found
......@@ -7,15 +7,19 @@ callback_exit_handler() \{
# report the status of the job to the INTERVENE backend
exit_code=$?
# todo: don't change the url, change the message content
if [ $exit_code -eq 0 ]; then
url="http://example.com/good/{name}"
body='\{"status": "COMPLETED",
"pipelineId": "{name}",
"outdir": ""}'
else
url="http://example.com/bad/{name}"
body='\{"status": "FAILED",
"pipelineId": "{name}",
"outdir": ""}'
fi
# do a callback
curl -s "$url"
url="https://dev.intervenegeneticscores.org/pipeline-manager/pipeline/csc/notify"
curl -X POST -H "Authorization: Bearer $CALLBACK_TOKEN" -d $body $url
exit $exit_code
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment