Commit
·
cb4ee7d
1
Parent(s):
a783fe6
fix(lightrag): use is_closed() instead of _closed
Browse files- lightrag/lightrag.py +1 -1
lightrag/lightrag.py
CHANGED
|
@@ -68,7 +68,7 @@ def always_get_an_event_loop() -> asyncio.AbstractEventLoop:
|
|
| 68 |
try:
|
| 69 |
# Try to get the current event loop
|
| 70 |
current_loop = asyncio.get_event_loop()
|
| 71 |
-
if current_loop.
|
| 72 |
raise RuntimeError("Event loop is closed.")
|
| 73 |
return current_loop
|
| 74 |
|
|
|
|
| 68 |
try:
|
| 69 |
# Try to get the current event loop
|
| 70 |
current_loop = asyncio.get_event_loop()
|
| 71 |
+
if current_loop.is_closed():
|
| 72 |
raise RuntimeError("Event loop is closed.")
|
| 73 |
return current_loop
|
| 74 |
|