fix: optimize database initialization and marketplace router ordering
Some checks failed
Some checks failed
Database Initialization Optimization: ✅ SELECTIVE MODEL IMPORT: Changed from wildcard to explicit imports - storage/db.py: Import only essential models (Job, Miner, MarketplaceOffer, etc.) - Reason: Avoids 2+ minute startup delays from loading all domain models - Impact: Faster application startup while maintaining required functionality Marketplace Router Ordering Fix: ✅ ROUTER PRECEDENCE: Moved marketplace_offers router after global_marketplace - main
This commit is contained in:
@@ -288,7 +288,6 @@ def create_app() -> FastAPI:
|
||||
app.include_router(services, prefix="/v1")
|
||||
app.include_router(users, prefix="/v1")
|
||||
app.include_router(exchange, prefix="/v1")
|
||||
app.include_router(marketplace_offers, prefix="/v1")
|
||||
app.include_router(payments, prefix="/v1")
|
||||
app.include_router(web_vitals, prefix="/v1")
|
||||
app.include_router(edge_gpu)
|
||||
@@ -309,6 +308,9 @@ def create_app() -> FastAPI:
|
||||
app.include_router(developer_platform, prefix="/v1")
|
||||
app.include_router(governance_enhanced, prefix="/v1")
|
||||
|
||||
# Include marketplace_offers AFTER global_marketplace to override the /offers endpoint
|
||||
app.include_router(marketplace_offers, prefix="/v1")
|
||||
|
||||
# Add blockchain router for CLI compatibility
|
||||
print(f"Adding blockchain router: {blockchain}")
|
||||
app.include_router(blockchain, prefix="/v1")
|
||||
|
||||
Reference in New Issue
Block a user