From 8b500b7d2f733689842d9f5c74d3616935ab2be1 Mon Sep 17 00:00:00 2001 From: Yash Patel Date: Thu, 5 Dec 2024 11:58:20 -0800 Subject: [PATCH] Add conversion for memory in retry --- config/resource_handler/resource_handler.config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config/resource_handler/resource_handler.config b/config/resource_handler/resource_handler.config index 8b3253d..e577a2a 100644 --- a/config/resource_handler/resource_handler.config +++ b/config/resource_handler/resource_handler.config @@ -117,7 +117,14 @@ class PipelineAllocation { // Separate the retry strategies from the base allocations this.processed_resources.each { process, allocations -> if (allocations.containsKey("retry_strategy")) { - this.retry_configurations[process] = allocations["retry_strategy"] + def current_retry_strategy = allocations["retry_strategy"] + // Convert memory string to MemoryUnit for proper retry setup + if (current_retry_strategy.containsKey("memory")) { + if (current_retry_strategy.memory.strategy == "add") { + current_retry_strategy.memory.operand = current_retry_strategy.memory.operand as nextflow.util.MemoryUnit + } + } + this.retry_configurations[process] = current_retry_strategy allocations.remove("retry_strategy") } }