diff --git a/builder-web.opam b/builder-web.opam index c4e164c..5dfd9a0 100644 --- a/builder-web.opam +++ b/builder-web.opam @@ -22,7 +22,7 @@ depends: [ "cstruct" {>= "6.0.0"} "bos" "hex" - "lwt" {>= "5.3.0"} + "lwt" {>= "5.6.0"} "caqti" {>= "1.8.0"} "caqti-lwt" "caqti-driver-sqlite3" diff --git a/lib/builder_web.ml b/lib/builder_web.ml index 24e5126..7d4e24a 100644 --- a/lib/builder_web.ml +++ b/lib/builder_web.ml @@ -240,7 +240,7 @@ module Viz_aux = struct (Fpath.to_string viz_path) Lwt_io.read ) - |> Lwt_result.map_err (fun exn -> `Msg (Printexc.to_string exn)) + |> Lwt_result.map_error (fun exn -> `Msg (Printexc.to_string exn)) |> if_error "Error getting cached visualization" end diff --git a/lib/model.ml b/lib/model.ml index 8df5791..d7f9cc7 100644 --- a/lib/model.ml +++ b/lib/model.ml @@ -315,7 +315,7 @@ let add_build let job_name = job.Builder.name in let staging_dir = Fpath.(staging datadir / Uuidm.to_string uuid) in let or_cleanup x = - Lwt_result.map_err (fun e -> + Lwt_result.map_error (fun e -> Bos.OS.Dir.delete ~recurse:true staging_dir |> Result.iter_error (fun e -> Log.err (fun m -> m "Failed to remove staging dir %a: %a" @@ -405,7 +405,7 @@ let add_build commit_files datadir staging_dir job_name uuid >|= fun () -> main_binary in - Lwt_result.bind_lwt_err (or_cleanup r) + Lwt_result.bind_lwt_error (or_cleanup r) (fun e -> Db.rollback () |> Lwt.map (fun r ->