feat: add prompt-first batches and pausable task guidance
This commit is contained in:
1 parent
cec9898e4c
commit
057f0c3050
44 files changed
+1080
-191
No files matched your search
@@ -152,7 +152,7 @@ async def on_startup():
|
||||
|
||||
cleaned = session_repo.cleanup_orphans_on_startup()
|
||||
if cleaned > 0:
|
||||
print(f"[ServerStartup] Marked {cleaned} orphaned running session(s) as failed.")
|
||||
print(f"[ServerStartup] Marked {cleaned} orphaned running session(s) as interrupted.")
|
||||
# Workers killed together with a previous daemon never remuxed their
|
||||
# recordings; publish whatever raw files they left behind.
|
||||
asyncio.create_task(asyncio.to_thread(task_queue_service.recover_orphaned_recordings_on_launch))
|
||||
@@ -176,7 +176,9 @@ async def on_shutdown():
|
||||
owned_session_ids = {
|
||||
str(item["session_id"])
|
||||
for item in state.queue_items
|
||||
if isinstance(item, dict) and item.get("status") == "running" and item.get("session_id")
|
||||
if isinstance(item, dict)
|
||||
and item.get("status") in {"running", "task_paused", "resuming"}
|
||||
and item.get("session_id")
|
||||
}
|
||||
|
||||
worker = state.worker_task
|
||||
@@ -212,7 +214,7 @@ async def on_shutdown():
|
||||
state.current_process = None
|
||||
state.queue_items.clear()
|
||||
for session_id in owned_session_ids:
|
||||
session_repo.update_session_status(session_id, "cancelled")
|
||||
session_repo.update_session_status(session_id, "interrupted")
|
||||
|
||||
from apps.admin_console.services.automation_service import background_tasks
|
||||
|
||||
|
||||
Reference in new issue
Block a user