From 3bc14ba3659c489d19bdb218c2e26027177025a7 Mon Sep 17 00:00:00 2001 From: Robur Date: Tue, 9 Jan 2024 14:16:04 +0000 Subject: [PATCH] Remove Model.artifacts_dir The directory is created later and the function is otherwise unused --- lib/model.ml | 2 -- lib/model.mli | 1 - 2 files changed, 3 deletions(-) diff --git a/lib/model.ml b/lib/model.ml index ec62243..acdd695 100644 --- a/lib/model.ml +++ b/lib/model.ml @@ -19,7 +19,6 @@ let not_found = function | Some v -> Lwt_result.return v let staging datadir = Fpath.(datadir / "_staging") -let artifacts_dir datadir = Fpath.(datadir / "_artifacts") let artifact_path artifact = let (`Hex sha256) = Hex.of_cstruct artifact.Builder_db.sha256 in (* NOTE: [sha256] is 64 characters when it's a hex sha256 checksum *) @@ -230,7 +229,6 @@ let save_artifacts staging artifacts = let commit_files datadir staging_dir job_name uuid artifacts = (* First we move the artifacts *) - Lwt.return (Bos.OS.Dir.create (artifacts_dir datadir)) >>= fun _ -> List.fold_left (fun r artifact -> r >>= fun () -> diff --git a/lib/model.mli b/lib/model.mli index db38ae3..c062f92 100644 --- a/lib/model.mli +++ b/lib/model.mli @@ -5,7 +5,6 @@ val pp_error : Format.formatter -> error -> unit val not_found : 'a option -> ('a, [> `Not_found ]) result Lwt.t val staging : Fpath.t -> Fpath.t -val artifacts_dir : Fpath.t -> Fpath.t val artifact_path : Builder_db.file -> Fpath.t val cleanup_staging : Fpath.t -> Caqti_lwt.connection ->