Skip to content

Instantly share code, notes, and snippets.

@tthyer
Created February 24, 2021 18:52
Show Gist options
  • Save tthyer/e3ac9c26c2dee82c7fdc24dbbf7ad837 to your computer and use it in GitHub Desktop.
Save tthyer/e3ac9c26c2dee82c7fdc24dbbf7ad837 to your computer and use it in GitHub Desktop.
wdl retry test
{
"write_to_cache": false,
"read_from_cache": false,
"default_runtime_attributes": {
"maxRetries": 2
}
}
task retry_test {
command {
if [ "$AWS_BATCH_JOB_ATTEMPT" -lt 2 ]; then
echo "inside if block"
exit 1
else
echo "AWS_BATCH_JOB_ATTEMPT = $AWS_BATCH_JOB_ATTEMPT"
exit 0
fi
}
output {
String message = read_string(stdout())
}
runtime {
docker: "ubuntu:latest"
}
}
workflow retry_test_wf {
call retry_test
output {
retry_test.message
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment