Spaces:
Running
Running
fix: remove current_step_label and error_message refs — columns missing from jobs table
Browse files
bioai-platform/backend/app/main.py
CHANGED
|
@@ -56,9 +56,7 @@ async def health():
|
|
| 56 |
|
| 57 |
@app.exception_handler(Exception)
|
| 58 |
async def global_exception_handler(request: Request, exc: Exception):
|
| 59 |
-
import traceback
|
| 60 |
-
traceback.print_exc()
|
| 61 |
return JSONResponse(
|
| 62 |
status_code=500,
|
| 63 |
-
content={"detail":
|
| 64 |
)
|
|
|
|
| 56 |
|
| 57 |
@app.exception_handler(Exception)
|
| 58 |
async def global_exception_handler(request: Request, exc: Exception):
|
|
|
|
|
|
|
| 59 |
return JSONResponse(
|
| 60 |
status_code=500,
|
| 61 |
+
content={"detail": "Internal server error"},
|
| 62 |
)
|
bioai-platform/backend/app/routers/pipelines.py
CHANGED
|
@@ -39,10 +39,9 @@ async def run_pipeline(req: PipelineRunRequest):
|
|
| 39 |
"steps_completed": [],
|
| 40 |
"context_json": None,
|
| 41 |
"progress_pct": 0,
|
| 42 |
-
"current_step_label": "Queued",
|
| 43 |
"created_at": datetime.now(timezone.utc).isoformat(),
|
| 44 |
"completed_at": None,
|
| 45 |
-
"
|
| 46 |
"share_token": None,
|
| 47 |
}).execute()
|
| 48 |
|
|
|
|
| 39 |
"steps_completed": [],
|
| 40 |
"context_json": None,
|
| 41 |
"progress_pct": 0,
|
|
|
|
| 42 |
"created_at": datetime.now(timezone.utc).isoformat(),
|
| 43 |
"completed_at": None,
|
| 44 |
+
"error": None,
|
| 45 |
"share_token": None,
|
| 46 |
}).execute()
|
| 47 |
|
bioai-platform/backend/app/workers/pipeline_worker.py
CHANGED
|
@@ -57,7 +57,6 @@ async def _set_step(job_id: str, step: str, progress_pct: int) -> None:
|
|
| 57 |
"status": step,
|
| 58 |
"steps_completed": [step],
|
| 59 |
"progress_pct": progress_pct,
|
| 60 |
-
"current_step_label": _step_label(step),
|
| 61 |
})
|
| 62 |
logger.info(f"[{job_id}] Step: {step}")
|
| 63 |
|
|
@@ -203,7 +202,6 @@ async def execute_blast_job(job_id: str, sequence: str) -> None:
|
|
| 203 |
"context_json": context,
|
| 204 |
"steps_completed": STEP_STATUSES,
|
| 205 |
"progress_pct": 100,
|
| 206 |
-
"current_step_label": "Complete",
|
| 207 |
})
|
| 208 |
|
| 209 |
logger.info(f"[{job_id}] Pipeline complete (demo={DEMO_MODE})")
|
|
@@ -212,7 +210,7 @@ async def execute_blast_job(job_id: str, sequence: str) -> None:
|
|
| 212 |
logger.error(f"[{job_id}] Pipeline failed: {exc}", exc_info=True)
|
| 213 |
await _patch_job(job_id, {
|
| 214 |
"status": "failed",
|
| 215 |
-
"
|
| 216 |
})
|
| 217 |
|
| 218 |
|
|
|
|
| 57 |
"status": step,
|
| 58 |
"steps_completed": [step],
|
| 59 |
"progress_pct": progress_pct,
|
|
|
|
| 60 |
})
|
| 61 |
logger.info(f"[{job_id}] Step: {step}")
|
| 62 |
|
|
|
|
| 202 |
"context_json": context,
|
| 203 |
"steps_completed": STEP_STATUSES,
|
| 204 |
"progress_pct": 100,
|
|
|
|
| 205 |
})
|
| 206 |
|
| 207 |
logger.info(f"[{job_id}] Pipeline complete (demo={DEMO_MODE})")
|
|
|
|
| 210 |
logger.error(f"[{job_id}] Pipeline failed: {exc}", exc_info=True)
|
| 211 |
await _patch_job(job_id, {
|
| 212 |
"status": "failed",
|
| 213 |
+
"error": str(exc),
|
| 214 |
})
|
| 215 |
|
| 216 |
|