()
| 695 | } |
| 696 | |
| 697 | fn check_dependencies() -> Result<(), String> { |
| 698 | let dependencies = vec!["git", "gource", "ffmpeg", "xvfb-run"]; |
| 699 | for dep in dependencies { |
| 700 | if let Err(_) = Command::new(dep).arg("--version").output() { |
| 701 | return Err(format!("{} is not available", dep)); |
| 702 | } |
| 703 | } |
| 704 | Ok(()) |
| 705 | } |
| 706 | |
| 707 | async fn serve_video(req: HttpRequest, job_id: web::Path<String>) -> Result<HttpResponse> { |
| 708 | let video_path = PathBuf::from(format!("/gource_videos/gource_{}.mp4", job_id)); |