AWS Batch Queue Switching Based on Number of Retries #4144
Replies: 2 comments 8 replies
-
|
Hi @kirkgrubbs1 , since version 22.04, Nextflow uses an AWS-specific mechanism to handle spot reclamations automatically. As a result, these retries are not "seen" by Nextflow. By default, AWS Batch will automatically retry the task 5 times before giving up, which means in your example the task would have to fail 20 times in order to be routed to the on-demand queue. 😅 You can control this setting with the |
Beta Was this translation helpful? Give feedback.
-
|
I tested it with below config, it work very well |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a pipeline running on AWS Batch via nextflow. This pipeline starts several parallel jobs some of which are longer than others. I currently have them being submitted to a spot based queue ("default-gwfcore"). Unfortunately, some of them run quite long and have a tendency get killed after exhausting the number of retries I have set. To remedy this I would like to have the jobs switch to our on-demand queue ("priority-gwfcore") on the 5th try. I added the following to the nextflow.config but it doesn't seem to accomplish what I want:
process.queue = { task.attempt > 4 ? 'priority-gwfcore' : 'default-gwfcore' }
Any help is greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions