Whitespace, log output
This commit is contained in:
parent
a6fe9ada45
commit
22ef6395b8
2 changed files with 6 additions and 3 deletions
|
@ -260,8 +260,8 @@ module Build = struct
|
|||
Caqti_type.int64
|
||||
t
|
||||
{| SELECT uuid, start_d, start_ps, finish_d, finish_ps,
|
||||
result_kind, result_code, result_msg,
|
||||
console, script, job
|
||||
result_kind, result_code, result_msg,
|
||||
console, script, job
|
||||
FROM build
|
||||
WHERE id = ?
|
||||
|}
|
||||
|
|
|
@ -24,6 +24,9 @@ let init ?(pool_size = 10) dbpath =
|
|||
|> Result.map (fun pool ->
|
||||
{ pool = (pool :> (Caqti_lwt.connection, [> db_error ]) Caqti_lwt.Pool.t); })
|
||||
|
||||
let pp_exec ppf (job, uuid, _, _, _, _, _) =
|
||||
Format.fprintf ppf "%s(%a)" job.Builder.name Uuidm.pp uuid
|
||||
|
||||
let safe_seg path =
|
||||
if Fpath.is_seg path && not (Fpath.is_rel_seg path)
|
||||
then Ok (Fpath.v path)
|
||||
|
@ -183,7 +186,7 @@ let routes t =
|
|||
| Ok () ->
|
||||
Lwt.return (Response.of_plain_text "Success!")
|
||||
| Error e ->
|
||||
Log.warn (fun m -> m "Error saving build: %a" pp_error e);
|
||||
Log.warn (fun m -> m "Error saving build %a: %a" pp_exec exec pp_error e);
|
||||
Lwt.return (Response.of_plain_text "Internal server error\n" ~status:`Internal_server_error)
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue