This commit is contained in:
Cyberes 2023-10-16 23:40:07 -06:00
parent 9e3cbc9d2e
commit 6f65791795
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ def inference_do_stream(stream_name: str, msg_to_backend: dict, backend_url: str
# If there is no more data, break the loop # If there is no more data, break the loop
if not chunk: if not chunk:
break break
message = pubsub.get_message() message = pubsub.get_message(timeout=0.001)
if message and message['data'] == b'canceled': if message and message['data'] == b'canceled':
print('Client canceled generation') print('Client canceled generation')
response.close() response.close()