From 8fe24a84d37966ee03cfb45ba6223278ad0465cc Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Wed, 17 Feb 2021 11:04:09 +0100
Subject: [PATCH] nextflow.config: fix errorStrategy

---
 src/nextflow.config | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/nextflow.config b/src/nextflow.config
index bd4971a5..5e595b52 100644
--- a/src/nextflow.config
+++ b/src/nextflow.config
@@ -17,7 +17,7 @@ profiles {
     docker.temp = "auto"
     docker.enabled = true
     process {
-      errorStrategy 'finish'
+      errorStrategy = 'finish'
       memory = '16 GB'
       withLabel: big_mem_mono_cpus {
         cpus = 1
@@ -31,7 +31,7 @@ profiles {
     singularity.enabled = true
     singularity.cacheDir = "./bin/"
     process {
-      errorStrategy 'finish'
+      errorStrategy = 'finish'
       memory = '16 GB'
       withLabel: big_mem_mono_cpus {
         cpus = 1
@@ -46,8 +46,8 @@ profiles {
     singularity.cacheDir = "$baseDir/.singularity_psmn/"
     singularity.runOptions = "--bind /Xnfs,/scratch"
     process{
-      errorStrategy 'retry'
-      maxRetries 3
+      errorStrategy = { sleep(Math.pow(2, task.attempt) * 200 as long); return 'retry' }
+      maxRetries = 3
       withLabel: big_mem_mono_cpus {
         executor = "sge"
         clusterOptions = "-cwd -V"
@@ -74,8 +74,8 @@ profiles {
     singularity.cacheDir = "$baseDir/.singularity_in2p3/"
     singularity.runOptions = "--bind /pbs,/sps,/scratch"
     process{
-      errorStrategy 'retry'
-      maxRetries 3
+      errorStrategy = { sleep(Math.pow(2, task.attempt) * 200 as long); return 'retry' }
+      maxRetries = 3
       withLabel: big_mem_mono_cpus {
         scratch = true
         stageInMode = "copy"
-- 
GitLab