Back to the room

Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works

Code Observatory / function

cancel_job

modules.code.router.cancel_job

PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.

PHAROS at 975a38dMIT license

Around this symbol

Search all symbols

Loading

Calls (2)
SymbolFileResolved by
canceljobs.pyunique name
job_outrouter.pysame file
Inside (1)
SymbolFileResolved by
routerrouter.pysame file
modules.code.router.cancel_jobbackend/app/modules/code/router.py, lines 193–201Open source
@router.post("/ingestion/jobs/{job_id}/cancel", response_model=JobOut)def cancel_job(job_id: uuid.UUID, db: Session = Depends(get_sync_db), _=Depends(require_admin)):    job = db.get(IngestionJob, job_id)    if job is None:        raise HTTPException(status_code=404, detail={"error": "not_found", "detail": "job not found"})    if not jobs.cancel(db, job_id):        raise HTTPException(status_code=409, detail={"error": "not_cancellable", "detail": f"job is {job.status}"})    db.refresh(job)    return job_out(job)

What the index recorded

Signature
def cancel_job(job_id: uuid.UUID, db: Session, _):
File
backend/app/modules/code/router.py
Lines
193–201
Parser
python-ast
Git blob
d914024790aaafe7234adda557677b76e4ad73d5
Call sites
6 named, 2 resolved, 4 left unlinked

Read it on GitHub at this commit