Matrix Agent
commited on
Commit
·
c5b1f8b
1
Parent(s):
ab30b6f
Fix asyncio event loop error in QueuedRequest dataclass
Browse files
app.py
CHANGED
|
@@ -90,7 +90,8 @@ class QueuedRequest:
|
|
| 90 |
id: str
|
| 91 |
priority: int = 0 # Higher = more priority
|
| 92 |
created_at: float = field(default_factory=time.time)
|
| 93 |
-
|
|
|
|
| 94 |
|
| 95 |
class RequestQueue:
|
| 96 |
def __init__(self, max_concurrent: int = 1, max_queue_size: int = 50):
|
|
|
|
| 90 |
id: str
|
| 91 |
priority: int = 0 # Higher = more priority
|
| 92 |
created_at: float = field(default_factory=time.time)
|
| 93 |
+
# Note: Future is created at runtime, not at class definition
|
| 94 |
+
future: Optional[asyncio.Future] = None
|
| 95 |
|
| 96 |
class RequestQueue:
|
| 97 |
def __init__(self, max_concurrent: int = 1, max_queue_size: int = 50):
|