Skip to content

Commit

Permalink
Add missing titles for code blocks in Cache and resume section
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Ribeiro-Dantas <[email protected]>
  • Loading branch information
mribeirodantas committed Jan 15, 2024
1 parent c15f6f8 commit 5c59650
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/basic_training/debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ There are cases in which a process error may be expected and it should not stop

To handle this use case, set the process `errorStrategy` to `ignore`:

```groovy linenums="1"
```groovy linenums="1" title="snippet.nf"
process FOO {
errorStrategy 'ignore'
Expand All @@ -92,7 +92,7 @@ process.errorStrategy = 'ignore'

In rare cases, errors may be caused by transient conditions. In this situation, an effective strategy is re-executing the failing task.

```groovy linenums="1"
```groovy linenums="1" title="snippet.nf"
process FOO {
errorStrategy 'retry'
Expand All @@ -111,7 +111,7 @@ The directive [maxRetries](https://www.nextflow.io/docs/latest/process.html#maxr

There are cases in which the required execution resources may be temporarily unavailable (e.g. network congestion). In these cases simply re-executing the same task will likely result in an identical error. A retry with an exponential backoff delay can better recover these error conditions.

```groovy linenums="1"
```groovy linenums="1" title="snippet.nf"
process FOO {
errorStrategy { sleep(Math.pow(2, task.attempt) * 200 as long); return 'retry' }
maxRetries 5
Expand All @@ -129,7 +129,7 @@ It’s a very common scenario that different instances of the same process may h

To handle this use case, you can use a `retry` error strategy and increase the computing resources allocated by the task at each successive _attempt_.

```groovy linenums="1"
```groovy linenums="1" title="snippet.nf"
process FOO {
cpus 4
memory { 2.GB * task.attempt } // (1)!
Expand Down

0 comments on commit 5c59650

Please sign in to comment.