abhisheksan commited on
Commit
fe1ffbc
·
1 Parent(s): c508112

Refactor main.py and add health check endpoint

Browse files
Files changed (2) hide show
  1. app/api/routes.py +7 -1
  2. app/main.py +2 -0
app/api/routes.py CHANGED
@@ -13,7 +13,13 @@ class ContentRequest(BaseModel):
13
  class CompareRequest(BaseModel):
14
  url1: str
15
  url2: str
16
-
 
 
 
 
 
 
17
  @router.post("/fingerprint")
18
  async def create_fingerprint(request: ContentRequest):
19
  try:
 
13
  class CompareRequest(BaseModel):
14
  url1: str
15
  url2: str
16
+ @router.get("/health")
17
+ @router.head("/health")
18
+ async def health_check():
19
+ """
20
+ Health check endpoint that responds to both GET and HEAD requests.
21
+ """
22
+ return Response(content="OK", media_type="text/plain")
23
  @router.post("/fingerprint")
24
  async def create_fingerprint(request: ContentRequest):
25
  try:
app/main.py CHANGED
@@ -6,6 +6,8 @@ from app.core.logging_config import configure_logging
6
  from app.core.firebase_config import initialize_firebase
7
  from app.api.forgery_routes import router as forgery_router
8
  import logging
 
 
9
 
10
  app = FastAPI()
11
 
 
6
  from app.core.firebase_config import initialize_firebase
7
  from app.api.forgery_routes import router as forgery_router
8
  import logging
9
+ import numba
10
+ numba.config.DISABLE_JIT = True
11
 
12
  app = FastAPI()
13