diff --git a/lib/builder_web.ml b/lib/builder_web.ml index 0b3cc2d..69c90d6 100644 --- a/lib/builder_web.ml +++ b/lib/builder_web.ml @@ -149,33 +149,6 @@ let routes t = |> Response.set_etag (Base64.encode_string (Cstruct.to_string digest)) in - let refresh _req = - let status = Lwt_unix.system "builder-db add" in - let stream = - let i = ref 0 in - Lwt_stream.from (fun () -> - i := !i + 1; - match !i with - | 1 -> - Lwt.return_some "Refresh job started.\n" - | 2 -> - let* status = status in - (match status with - | Unix.WEXITED 0 -> - Lwt.return_some "Refresh job was successful!" - | Unix.WEXITED n -> - Lwt.return_some (Printf.sprintf "Refresh job failed : %d" n) - | Unix.WSIGNALED _ | Unix.WSTOPPED _ -> - Lwt.return_some ("Refresh job signalled")) - | _ -> - Lwt.return_none) - in - let body = Body.of_stream stream in - Response.make ~body () - |> Response.set_content_type "text/plain" - |> Lwt.return - in - let upload req = let* body = Request.to_plain_text req in match Builder.Asn.exec_of_cs (Cstruct.of_string body) with @@ -198,7 +171,6 @@ let routes t = App.get "/job/:job/" job; App.get "/job/:job/build/:build/" job_build; App.get "/job/:job/build/:build/f/**" job_build_file; - App.get "/refresh" refresh; App.post "/upload" (authorized t upload); ]