jianghuyihei commited on
Commit
8b7eba7
1 Parent(s): dc15d27
Files changed (2) hide show
  1. __pycache__/app.cpython-310.pyc +0 -0
  2. app.py +1 -3
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -11,8 +11,6 @@ import threading
11
  import logging
12
  from queue import Queue
13
  import json
14
- import yaml
15
- import os
16
 
17
  lock = threading.Lock()
18
  app = FastAPI()
@@ -432,7 +430,6 @@ async def websocket_endpoint(websocket: WebSocket):
432
  if item == user_id:
433
  queue.queue.remove(item)
434
  print(f"User {user_id} disconnected.")
435
- break
436
  except WebSocketDisconnect:
437
  print("WebSocket connection closed.")
438
 
@@ -448,6 +445,7 @@ def form_get(request: Request):
448
  def form_post(request: Request,topic: str = Form(...), user_id: str = Form(...), state: str = Form(...)):
449
  global reply_count
450
  global current_user
 
451
  start_time = time.time()
452
  client_ip = request.client.host
453
  if user_id == "":
 
11
  import logging
12
  from queue import Queue
13
  import json
 
 
14
 
15
  lock = threading.Lock()
16
  app = FastAPI()
 
430
  if item == user_id:
431
  queue.queue.remove(item)
432
  print(f"User {user_id} disconnected.")
 
433
  except WebSocketDisconnect:
434
  print("WebSocket connection closed.")
435
 
 
445
  def form_post(request: Request,topic: str = Form(...), user_id: str = Form(...), state: str = Form(...)):
446
  global reply_count
447
  global current_user
448
+ print("current queue length",len(queue.queue))
449
  start_time = time.time()
450
  client_ip = request.client.host
451
  if user_id == "":