Skip to content

Commit

Permalink
Merge branch 'dev' into rm_nfcore_external_java_deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Jan 26, 2024
2 parents c0d5bdd + 996c54b commit cc3aa5f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
- Add conda channel order to nextflow.config ([#2094](https://github.com/nf-core/tools/pull/2094))
- Fix tyop in pipeline nextflow.config ([#2664](https://github.com/nf-core/tools/pull/2664))
- Remove `nfcore_external_java_deps.jar` from lib directory in pipeline template ([#2675](https://github.com/nf-core/tools/pull/2675))
- Add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678))
- Add new pipeline error message pointing to docs when 'requirement exceeds available memory' error message ([#2680](https://github.com/nf-core/tools/pull/2680))

### Download

Expand Down Expand Up @@ -39,6 +41,7 @@
- Update pre-commit hook astral-sh/ruff-pre-commit to v0.1.13 ([#2660](https://github.com/nf-core/tools/pull/2660))
- Add new subcommand: `nf-core logo-create` to output an nf-core logo for a pipeline (instead of going through the website) ([#2662](https://github.com/nf-core/tools/pull/2662))
- Update actions/cache action to v4 ([#2666](https://github.com/nf-core/tools/pull/2666))
- Handle api redirects from the old site ([#2672](https://github.com/nf-core/tools/pull/2672))
- Remove redundanct v in pipeline version for emails ([#2667](https://github.com/nf-core/tools/pull/2667))
- add function to check `-profile` is well formatted ([#2678](https://github.com/nf-core/tools/pull/2678))

Expand Down
7 changes: 7 additions & 0 deletions nf_core/pipeline-template/workflows/pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,13 @@ workflow.onComplete {
}
}

workflow.onError {
if (workflow.errorReport.contains("Process requirement exceeds available memory")) {
println("🛑 Default resources exceed availability 🛑 ")
println("💡 See here on how to configure pipeline: https://nf-co.re/docs/usage/configuration#tuning-workflow-resources 💡")
}
}

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
Expand Down
5 changes: 4 additions & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,14 @@ def poll_nfcore_web_api(api_url, post_data=None):
except requests.exceptions.ConnectionError:
raise AssertionError(f"Could not connect to URL: {api_url}")
else:
if response.status_code != 200:
if response.status_code != 200 and response.status_code != 301:
log.debug(f"Response content:\n{response.content}")
raise AssertionError(
f"Could not access remote API results: {api_url} (HTML {response.status_code} Error)"
)
# follow redirects
if response.status_code == 301:
return poll_nfcore_web_api(response.headers["Location"], post_data)
try:
web_response = json.loads(response.content)
if "status" not in web_response:
Expand Down

0 comments on commit cc3aa5f

Please sign in to comment.