Skip to content

Commit

Permalink
update for latest api
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPatrie committed Oct 17, 2024
1 parent 3790926 commit 35f2d3c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion compose_api/.CONTAINER_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.6
1.11.7
13 changes: 6 additions & 7 deletions compose_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,13 @@ async def fetch_results(job_id: str):

# output-case: output content in dict is a downloadable file
if isinstance(job_data, dict):
if "results_file" in job_data.keys():
remote_fp = job_data['results_file']
if remote_fp is not None:
temp_dest = mkdtemp()
local_fp = download_file_from_bucket(source_blob_path=remote_fp, out_dir=temp_dest, bucket_name=BUCKET_NAME)
remote_fp = job_data.get("results").get("results_file")
if remote_fp is not None:
temp_dest = mkdtemp()
local_fp = download_file_from_bucket(source_blob_path=remote_fp, out_dir=temp_dest, bucket_name=BUCKET_NAME)

return FileResponse(path=local_fp, media_type="application/octet-stream", filename=local_fp.split("/")[-1])
# return {'path': local_fp, 'media_type': 'application/octet-stream', 'filename': local_fp.split('/')[-1]}
return FileResponse(path=local_fp, media_type="application/octet-stream", filename=local_fp.split("/")[-1])
# return {'path': local_fp, 'media_type': 'application/octet-stream', 'filename': local_fp.split('/')[-1]}

# otherwise, return job content
return {'content': job}
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
build:
context: ./compose_api
dockerfile: ./Dockerfile-compose_api
image: ghcr.io/biosimulators/bio-check-compose_api:1.11.7 # .3
image: ghcr.io/biosimulators/bio-check-compose_api:1.11.8 # .3
container_name: api
environment:
- MONGO_URI=mongodb://mongodb:27017/?retryWrites=true&w=majority&appName=bio-compose
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/biochecknet/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace: biochecknet
# PREVIOUS (MOST CURRENTLY RELEASED) VERSIONS AS OF 10/17(SMOLDYN BUG): api: 1.11.4, worker: 1.11.6
images:
- name: ghcr.io/biosimulators/bio-check-compose_api
newTag: 1.11.7
newTag: 1.11.8
- name: ghcr.io/biosimulators/bio-check-compose_worker
newTag: 1.11.6
- name: mongo
Expand Down

0 comments on commit 35f2d3c

Please sign in to comment.