Skip to content

Commit

Permalink
Merge pull request #189 from ranking-agent/response_bug
Browse files Browse the repository at this point in the history
fix response bug
  • Loading branch information
cbizon authored Jun 5, 2023
2 parents 345393a + b68c364 commit f62d982
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openapi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ servers:
# url: http://127.0.0.1:5000
termsOfService: http://robokop.renci.org:7055/tos?service_long=ARAGORN&provider_long=RENCI
title: ARAGORN
version: 2.4.9
version: 2.4.10
tags:
- name: translator
- name: ARA
Expand Down
6 changes: 5 additions & 1 deletion src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,11 @@ async def subservice_post(name, url, message, guid, asyncquery=False, params=Non
if asyncquery:
# handle the response
responses = await post_with_callback(url, message, guid, params)
response = responses[0]
#post_with_callback is returning the json dict, not a response, but the stuff below expects
# response object
response = Response()
response.status_code = 200
response._content = bytes(json.dumps(responses[0]), "utf-8")
else:
# async call to external services with hour timeout
async with httpx.AsyncClient(timeout=httpx.Timeout(timeout=60 * 60)) as client:
Expand Down

0 comments on commit f62d982

Please sign in to comment.