Spaces:
Sleeping
Sleeping
Merge branch 'main' into migrate-to-database
Browse files- app/main.py +4 -1
- resources/projects_original.csv +0 -0
app/main.py
CHANGED
|
@@ -97,6 +97,7 @@ def root():
|
|
| 97 |
|
| 98 |
@app.get("/api/health")
|
| 99 |
def health_check():
|
|
|
|
| 100 |
return {"status": "ok"}
|
| 101 |
|
| 102 |
|
|
@@ -133,6 +134,7 @@ def get_summary_data():
|
|
| 133 |
summaries_payload.append(summary.model_dump(mode="json"))
|
| 134 |
|
| 135 |
content = json.dumps(summaries_payload, ensure_ascii=False).encode("utf-8")
|
|
|
|
| 136 |
return Response(
|
| 137 |
content=gzip.compress(content),
|
| 138 |
headers={"Content-Encoding": "gzip", "Content-Type": "application/json"},
|
|
@@ -148,6 +150,7 @@ def get_project_detail(projectId: str = Query(..., description="取得したい
|
|
| 148 |
p = projects_service.get_project(projectId)
|
| 149 |
if not p:
|
| 150 |
raise HTTPException(status_code=404, detail="Project not found")
|
|
|
|
| 151 |
return ProjectDetail(**p.model_dump(include=set(ProjectDetail.model_fields.keys())))
|
| 152 |
|
| 153 |
|
|
@@ -199,7 +202,7 @@ def search(request: SearchRequest):
|
|
| 199 |
)
|
| 200 |
except Exception:
|
| 201 |
pass
|
| 202 |
-
|
| 203 |
return ProjectIds(projectIds=ids)
|
| 204 |
|
| 205 |
|
|
|
|
| 97 |
|
| 98 |
@app.get("/api/health")
|
| 99 |
def health_check():
|
| 100 |
+
log.info("Health check OK")
|
| 101 |
return {"status": "ok"}
|
| 102 |
|
| 103 |
|
|
|
|
| 134 |
summaries_payload.append(summary.model_dump(mode="json"))
|
| 135 |
|
| 136 |
content = json.dumps(summaries_payload, ensure_ascii=False).encode("utf-8")
|
| 137 |
+
log.info(f"Project summaries fetched: {len(summaries_payload)} items")
|
| 138 |
return Response(
|
| 139 |
content=gzip.compress(content),
|
| 140 |
headers={"Content-Encoding": "gzip", "Content-Type": "application/json"},
|
|
|
|
| 150 |
p = projects_service.get_project(projectId)
|
| 151 |
if not p:
|
| 152 |
raise HTTPException(status_code=404, detail="Project not found")
|
| 153 |
+
log.info(f"Project detail fetched: {projectId}")
|
| 154 |
return ProjectDetail(**p.model_dump(include=set(ProjectDetail.model_fields.keys())))
|
| 155 |
|
| 156 |
|
|
|
|
| 202 |
)
|
| 203 |
except Exception:
|
| 204 |
pass
|
| 205 |
+
log.info(f'Search query="{request.query}" => {len(ids)} results')
|
| 206 |
return ProjectIds(projectIds=ids)
|
| 207 |
|
| 208 |
|
resources/projects_original.csv
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|