Skip to content

Commit

Permalink
[FIX] if no test webin upload fixed -test parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dameyerdave committed Dec 17, 2024
1 parent 4699d71 commit 96f42a2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
43 changes: 29 additions & 14 deletions api/app/core/ena_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
5 changes: 5 additions & 0 deletions api/app/ena_upload_ms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
2 changes: 0 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3"

services:
api:
environment:
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
volumes:
pg_data:
services:
Expand Down

0 comments on commit 96f42a2

Please sign in to comment.