Skip to content

Commit

Permalink
Added ability to limit network connections
Browse files Browse the repository at this point in the history
  • Loading branch information
apetkau committed Jan 25, 2024
1 parent 7e0732a commit 31dd98e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ process {
pattern: '*_versions.yml'
]
}

withName: SRATOOLS_PREFETCH {
maxForks = params.max_jobs_with_network_connections
}
}
13 changes: 8 additions & 5 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ params {
max_time = '1.h'

// Schema validation default options
validationFailUnrecognisedParams = false
validationLenientMode = false
validationSchemaIgnoreParams = 'genomes,igenomes_base'
validationShowHiddenParams = false
validate_params = true
validationFailUnrecognisedParams = false
validationLenientMode = false
validationSchemaIgnoreParams = 'genomes,igenomes_base'
validationShowHiddenParams = false
validate_params = true

// Options for limiting network activity
max_jobs_with_network_connections = 1
}

// Load base.config by default for all pipelines
Expand Down
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,12 @@
"description": "Validation of parameters in lenient more.",
"hidden": true,
"help_text": "Allows string values that are parseable as numbers or booleans. For further information see [JSONSchema docs](https://github.com/everit-org/json-schema#lenient-mode)."
},
"max_jobs_with_network_connections": {
"type": "integer",
"default": 1,
"description": "Maximum number of jobs with network connections allowed to run at once",
"hidden": true
}
}
}
Expand Down

0 comments on commit 31dd98e

Please sign in to comment.