sync update from LAN repo (source ji @ 85078a31)
This commit is contained in:
1 parent
5d6627af50
commit
e602d88695
864 files changed
+99150
-6346
No files matched your search
@@ -51,6 +51,19 @@ class DeepResearchJobDispatcher:
|
||||
self._task = asyncio.create_task(self._loop(), name="deep-research-job-dispatcher")
|
||||
logger.info("[deep-research] dispatcher started (worker=%s)", self._worker_id)
|
||||
|
||||
def ensure_started(self) -> bool:
|
||||
"""Restart the loop if it died after lifespan. Returns True if a new loop started."""
|
||||
if self._stopping:
|
||||
return False
|
||||
if self._task is not None and not self._task.done():
|
||||
return False
|
||||
logger.warning(
|
||||
"[deep-research] dispatcher loop was not running; restarting (worker=%s)",
|
||||
self._worker_id,
|
||||
)
|
||||
self.start()
|
||||
return True
|
||||
|
||||
async def stop(self) -> None:
|
||||
"""Stop the background loop (called from lifespan shutdown)."""
|
||||
self._stopping = True
|
||||
|
||||
Reference in new issue
Block a user