Working docker-compose.yaml added. Services start and work.

This commit is contained in:
2026-08-02 13:19:19 +05:00
parent cd3ce0337b
commit 6707a8e27e
12 changed files with 232 additions and 11 deletions
+7 -4
View File
@@ -7,7 +7,7 @@ from fastapi.middleware.cors import CORSMiddleware
from backend.config import settings
from backend.api import upload, split, status, download
from backend.api.websocket import router as websocket_router
from backend.services import progress_publisher # Import the module
from backend.services import progress_publisher
app = FastAPI(
title="Audio Splitter Web API",
@@ -24,9 +24,12 @@ app.add_middleware(
allow_headers=["*"],
)
# Store the main event loop in the progress_publisher module
# This avoids a circular import
progress_publisher.MAIN_LOOP = asyncio.get_running_loop()
@app.on_event("startup")
async def startup_event():
"""Store the main event loop for use in other threads."""
progress_publisher.MAIN_LOOP = asyncio.get_running_loop()
# Include routers
app.include_router(upload.router)