MCPcopy Create free account
hub / github.com/3eif/gitmotion / get_job_status

Function get_job_status

api/src/main.rs:416–436  ·  view source on GitHub ↗
(
    job_id: web::Path<String>,
    job_store: web::Data<JobStore>,
)

Source from the content-addressed store, hash-verified

414}
415
416async fn get_job_status(
417 job_id: web::Path<String>,
418 job_store: web::Data<JobStore>,
419) -> impl Responder {
420 let store = job_store.lock().await;
421 match store.get(job_id.as_str()) {
422 Some(status) => {
423 info!(
424 "Returning job status for {}: step={:?}, video_url={:?}",
425 job_id, status.step, status.video_url
426 );
427 HttpResponse::Ok().json(status.clone())
428 }
429 None => {
430 info!("Job not found: {}", job_id);
431 HttpResponse::NotFound().json(serde_json::json!({
432 "error": "Job not found"
433 }))
434 }
435 }
436}
437
438async fn update_job_status(job_store: &JobStore, job_id: &str, step: ProgressStep) {
439 let mut store = job_store.lock().await;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected