()
| 108 | |
| 109 | |
| 110 | async def _sweep_loop() -> None: |
| 111 | if _sweep_disabled(): |
| 112 | _log.info("desktop mode: job TTL sweep disabled (library is user-managed)") |
| 113 | return |
| 114 | while True: |
| 115 | try: |
| 116 | await asyncio.to_thread(sweep_old_jobs, JOBS_DIR) |
| 117 | except Exception: |
| 118 | _log.warning("sweep failed", exc_info=True) |
| 119 | await asyncio.sleep(3600) |
| 120 | |
| 121 | |
| 122 | async def _desktop_parent_watchdog(parent_pid: int) -> None: |