process {
    // Defaults
    cpus = {check_max(1, 'cpus' )}
    memory = {check_max(1.GB * task.attempt, 'memory' )}
    time = {check_max( (params.min_time).m * task.attempt, 'time' )}
    errorStrategy = 'retry'
    maxRetries = 1

    // Half cpus
    withName: 'insertion_sites' {
        cpus = {check_max(Math.round(params.cpus * 0.5), 'cpus' )}
    }
}
