Skip to content

Commit

Permalink
Add conversion for memory in retry
Browse files Browse the repository at this point in the history
  • Loading branch information
yashpatel6 committed Dec 5, 2024
1 parent 92d543e commit 8b500b7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion config/resource_handler/resource_handler.config
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down

0 comments on commit 8b500b7

Please sign in to comment.