mitulagr2 commited on
Commit
ce54787
1 Parent(s): 3f857b9

Update main.py

Browse files
Files changed (1) hide show
  1. app/main.py +3 -1
app/main.py CHANGED
@@ -74,11 +74,13 @@ async def websocket_endpoint(websocket: WebSocket, client_id: int):
74
 
75
  async def astreamer(generator):
76
  try:
 
77
  for i in generator:
 
78
  yield (i)
79
  await asyncio.sleep(.1)
80
  except asyncio.CancelledError as e:
81
- print('cancelled')
82
 
83
 
84
  @app.get("/query")
 
74
 
75
  async def astreamer(generator):
76
  try:
77
+ print("streaming........")
78
  for i in generator:
79
+ print(i)
80
  yield (i)
81
  await asyncio.sleep(.1)
82
  except asyncio.CancelledError as e:
83
+ yield ('cancelled')
84
 
85
 
86
  @app.get("/query")