nf-core / tools

Python package with helper tools for the nf-core community.
https://nf-co.re
MIT License
242 stars 191 forks source link

Update base to use new previous task #3269

Open edmundmiller opened 3 weeks ago

edmundmiller commented 3 weeks ago

Released in 24.10.0, it allows retries to be a bit smarter by using the previous tasks memory and CPU usage.

https://www.nextflow.io/docs/latest/process.html#dynamic-task-resources-with-previous-execution-trace

process foo {
    memory { task.attempt > 1 ? task.previousTrace.memory * 2 : (1.GB) }
    errorStrategy { task.exitStatus in 137..140 ? 'retry' : 'terminate' }
    maxRetries 3

    script:
    <your job here>
}