()
| 65 | |
| 66 | _shutdown_event = asyncio.Event() |
| 67 | |
| 68 | async def _activity_flush_loop(): |
| 69 | while not _shutdown_event.is_set(): |
| 70 | try: |
| 71 | await asyncio.wait_for(_shutdown_event.wait(), timeout=_FLUSH_INTERVAL) |
| 72 | break # shutdown signaled |
| 73 | except asyncio.TimeoutError: |
| 74 | pass |
| 75 | try: |
| 76 | await _flush_activity_buffer() |
| 77 | except Exception as e: |
| 78 | logger.warning(f"[库洛签到·插件] 活跃度刷写循环异常: {e}") |
| 79 |
nothing calls this directly
no test coverage detected