From 96f42a2b098e09d9a22c54eda294dfee70d1250e Mon Sep 17 00:00:00 2001 From: dameyerdave Date: Tue, 17 Dec 2024 09:29:39 +0100 Subject: [PATCH] [FIX] if no test webin upload fixed -test parameter --- api/app/core/ena_helpers.py | 43 +++++++++++++++++++++---------- api/app/ena_upload_ms/settings.py | 5 ++++ docker-compose.dev.yml | 2 -- docker-compose.yml | 1 - 4 files changed, 34 insertions(+), 17 deletions(-) diff --git a/api/app/core/ena_helpers.py b/api/app/core/ena_helpers.py index 863d69d..ffa4c35 100644 --- a/api/app/core/ena_helpers.py +++ b/api/app/core/ena_helpers.py @@ -230,20 +230,35 @@ def webin_upload(job: AnalysisJob): mf.write(job.manifest.encode("utf-8")) mf.close() try: - out = webin( - "-context", - "genome", - "-username", - settings.ENA_USERNAME, - "-password", - settings.ENA_PASSWORD, - "-manifest", - mf.name, - "-submit", - "-ascp", - "-test" if settings.ENA_USE_DEV_ENDPOINT else "", - _err_to_out=True, - ) + if settings.ENA_USE_DEV_ENDPOINT: + out = webin( + "-context", + "genome", + "-username", + settings.ENA_USERNAME, + "-password", + settings.ENA_PASSWORD, + "-manifest", + mf.name, + "-submit", + "-ascp", + "-test", + _err_to_out=True, + ) + else: + out = webin( + "-context", + "genome", + "-username", + settings.ENA_USERNAME, + "-password", + settings.ENA_PASSWORD, + "-manifest", + mf.name, + "-submit", + "-ascp", + _err_to_out=True, + ) log.debug(f"Submission output: {out}") accession = re.findall("ERZ[0-9]+", out, flags=re.MULTILINE) log.debug(f"Accessions: {accession}") diff --git a/api/app/ena_upload_ms/settings.py b/api/app/ena_upload_ms/settings.py index 1559ba0..84914bb 100644 --- a/api/app/ena_upload_ms/settings.py +++ b/api/app/ena_upload_ms/settings.py @@ -294,3 +294,8 @@ ENA_UPLOAD_FREQ_SECS = int(environ.get("ENA_UPLOAD_FREQ_SECS", 5)) TEMPLATE_DIR = "/templates" DATA_DIR = "/data" + +### +# Proxy support +### +ENA_PROXY_PREFIX = environ.get("ENA_PROXY_PREFIX", "") \ No newline at end of file diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index 610f176..3bd5539 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -1,5 +1,3 @@ -version: "3" - services: api: environment: diff --git a/docker-compose.yml b/docker-compose.yml index a7a1775..807b51a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "3" volumes: pg_data: services: