fix: 采集循环单轮容错 + 事件流水目录自动创建(Linux 首启致命bug)
This commit is contained in:
+7
-1
@@ -47,7 +47,13 @@ async def collector_task(_app):
|
||||
|
||||
async def poll():
|
||||
while True:
|
||||
await loop.run_in_executor(None, collector.one_cycle)
|
||||
try:
|
||||
await loop.run_in_executor(None, collector.one_cycle)
|
||||
except asyncio.CancelledError:
|
||||
raise
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
await asyncio.sleep(60)
|
||||
|
||||
task = asyncio.create_task(poll())
|
||||
|
||||
Reference in New Issue
Block a user