Skip to content

Commit

Permalink
fix: async task response deserialization crash (#4865)
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Jul 17, 2024
1 parent 2df8f44 commit 4c41872
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/_bentoml_impl/tasks/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ async def get(self, task_id: str) -> CompletedResultRow[Request, Response]:
row[4],
row[5],
await self.serializer.deserialize_request(row[1]),
await self.serializer.deserialize_request(row[1]),
await self.serializer.deserialize_response(row[3]),
row[6],
)

Expand Down
2 changes: 1 addition & 1 deletion src/_bentoml_impl/tasks/serde.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async def _consume_response(response: Response) -> bytes:
# This will collect the response body into a buffer
# and run until the background task is done
buffer = io.BytesIO()
scope: dict[str, t.Any] = {}
scope: dict[str, t.Any] = {"type": "http"}

def receive() -> t.Awaitable[Message]:
# A fake receive that never returns
Expand Down

0 comments on commit 4c41872

Please sign in to comment.