adjust
This commit is contained in:
parent
9e3cbc9d2e
commit
6f65791795
|
@ -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()
|
||||||
|
|
Reference in New Issue