(
job_id: web::Path<String>,
job_store: web::Data<JobStore>,
)
| 414 | } |
| 415 | |
| 416 | async 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 | |
| 438 | async fn update_job_status(job_store: &JobStore, job_id: &str, step: ProgressStep) { |
| 439 | let mut store = job_store.lock().await; |
nothing calls this directly
no outgoing calls
no test coverage detected