mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-31 14:43:35 +00:00
Merge branch 'master' into feature/expand-project-with-ai
This commit is contained in:
@@ -22,12 +22,13 @@ from .routers import (
|
||||
features_router,
|
||||
filesystem_router,
|
||||
projects_router,
|
||||
settings_router,
|
||||
spec_creation_router,
|
||||
)
|
||||
from .schemas import SetupStatus
|
||||
from .services.assistant_chat_session import cleanup_all_sessions as cleanup_assistant_sessions
|
||||
from .services.expand_chat_session import cleanup_all_expand_sessions
|
||||
from .services.process_manager import cleanup_all_managers
|
||||
from .services.process_manager import cleanup_all_managers, cleanup_orphaned_locks
|
||||
from .websocket import project_websocket
|
||||
|
||||
# Paths
|
||||
@@ -38,7 +39,8 @@ UI_DIST_DIR = ROOT_DIR / "ui" / "dist"
|
||||
@asynccontextmanager
|
||||
async def lifespan(app: FastAPI):
|
||||
"""Lifespan context manager for startup and shutdown."""
|
||||
# Startup
|
||||
# Startup - clean up orphaned lock files from previous runs
|
||||
cleanup_orphaned_locks()
|
||||
yield
|
||||
# Shutdown - cleanup all running agents and sessions
|
||||
await cleanup_all_managers()
|
||||
@@ -96,6 +98,7 @@ app.include_router(spec_creation_router)
|
||||
app.include_router(expand_project_router)
|
||||
app.include_router(filesystem_router)
|
||||
app.include_router(assistant_chat_router)
|
||||
app.include_router(settings_router)
|
||||
|
||||
|
||||
# ============================================================================
|
||||
|
||||
Reference in New Issue
Block a user