Skip to content

Instantly share code, notes, and snippets.

@GJSissons
Created July 24, 2023 12:49
Show Gist options
  • Save GJSissons/2b765eed085f79d849715cba2ab5822a to your computer and use it in GitHub Desktop.
Save GJSissons/2b765eed085f79d849715cba2ab5822a to your computer and use it in GitHub Desktop.
Automating Tower workflows 11
process {
errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' }
maxRetries = 3
withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_medium {
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel:process_high {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment