Phase 0.1: Remove backend deprecated code
- Delete routes: counter.py, sum.py - Delete jobs.py and worker.py - Delete tests: test_counter.py, test_jobs.py - Update audit.py: keep only price-history endpoints - Update models.py: remove VIEW_COUNTER, INCREMENT_COUNTER, USE_SUM permissions - Update models.py: remove Counter, SumRecord, CounterRecord, RandomNumberOutcome models - Update schemas.py: remove sum/counter related schemas - Update main.py: remove deleted router imports - Update test_permissions.py: remove tests for deprecated features - Update test_price_history.py: remove worker-related tests - Update conftest.py: remove mock_enqueue_job fixture - Update auth.py: fix example in docstring
This commit is contained in:
parent
ea85198171
commit
5bad1e7e17
14 changed files with 35 additions and 1393 deletions
|
|
@ -6,16 +6,13 @@ from fastapi import FastAPI
|
|||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from database import Base, engine
|
||||
from jobs import close_job_pool
|
||||
from routes import audit as audit_routes
|
||||
from routes import auth as auth_routes
|
||||
from routes import availability as availability_routes
|
||||
from routes import booking as booking_routes
|
||||
from routes import counter as counter_routes
|
||||
from routes import invites as invites_routes
|
||||
from routes import meta as meta_routes
|
||||
from routes import profile as profile_routes
|
||||
from routes import sum as sum_routes
|
||||
from validate_constants import validate_shared_constants
|
||||
|
||||
|
||||
|
|
@ -28,8 +25,6 @@ async def lifespan(app: FastAPI):
|
|||
async with engine.begin() as conn:
|
||||
await conn.run_sync(Base.metadata.create_all)
|
||||
yield
|
||||
# Cleanup on shutdown
|
||||
await close_job_pool()
|
||||
|
||||
|
||||
app = FastAPI(lifespan=lifespan)
|
||||
|
|
@ -44,8 +39,6 @@ app.add_middleware(
|
|||
|
||||
# Include routers - modules with single router
|
||||
app.include_router(auth_routes.router)
|
||||
app.include_router(sum_routes.router)
|
||||
app.include_router(counter_routes.router)
|
||||
app.include_router(audit_routes.router)
|
||||
app.include_router(profile_routes.router)
|
||||
app.include_router(availability_routes.router)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue