Working docker-compose.yaml added. Services start and work.
This commit is contained in:
+7
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user