Spaces:
Runtime error
Runtime error
da03
commited on
Commit
·
016f9e1
1
Parent(s):
fc0bb07
main.py
CHANGED
|
@@ -251,8 +251,10 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
| 251 |
finally:
|
| 252 |
is_processing = False
|
| 253 |
print(f"[{time.perf_counter():.3f}] Processing complete. Queue size before checking next input: {input_queue.qsize()}")
|
| 254 |
-
# Check if we have more inputs to process after this one
|
| 255 |
-
|
|
|
|
|
|
|
| 256 |
|
| 257 |
async def process_next_input():
|
| 258 |
nonlocal is_processing
|
|
|
|
| 251 |
finally:
|
| 252 |
is_processing = False
|
| 253 |
print(f"[{time.perf_counter():.3f}] Processing complete. Queue size before checking next input: {input_queue.qsize()}")
|
| 254 |
+
# Check if we have more inputs to process after this one
|
| 255 |
+
if not input_queue.empty():
|
| 256 |
+
print(f"[{time.perf_counter():.3f}] Queue not empty, processing next input")
|
| 257 |
+
asyncio.create_task(process_next_input())
|
| 258 |
|
| 259 |
async def process_next_input():
|
| 260 |
nonlocal is_processing
|