log git interaction
This commit is contained in:
parent
329b78c923
commit
e22047249f
1 changed files with 3 additions and 2 deletions
|
@ -445,11 +445,13 @@ stamp: %S
|
||||||
|
|
||||||
let update_git t git_kv =
|
let update_git t git_kv =
|
||||||
Lwt_mutex.with_lock update_lock (fun () ->
|
Lwt_mutex.with_lock update_lock (fun () ->
|
||||||
|
Logs.info (fun m -> m "pulling the git repository");
|
||||||
Git_kv.pull git_kv >>= function
|
Git_kv.pull git_kv >>= function
|
||||||
| Error `Msg msg ->
|
| Error `Msg msg ->
|
||||||
Logs.err (fun m -> m "error %s while updating git" msg);
|
Logs.err (fun m -> m "error %s while updating git" msg);
|
||||||
Lwt.return None
|
Lwt.return None
|
||||||
| Ok [] ->
|
| Ok [] ->
|
||||||
|
Logs.info (fun m -> m "git changes are empty");
|
||||||
Lwt.return (Some [])
|
Lwt.return (Some [])
|
||||||
| Ok changes ->
|
| Ok changes ->
|
||||||
commit_id git_kv >>= fun commit_id ->
|
commit_id git_kv >>= fun commit_id ->
|
||||||
|
@ -645,8 +647,7 @@ stamp: %S
|
||||||
Paf.init ~port:(Key_gen.port ()) (Stack.tcp stack) >>= fun t ->
|
Paf.init ~port:(Key_gen.port ()) (Stack.tcp stack) >>= fun t ->
|
||||||
let update () =
|
let update () =
|
||||||
Serve.update_git serve git_kv >>= function
|
Serve.update_git serve git_kv >>= function
|
||||||
| None -> Lwt.return_unit
|
| None | Some [] -> Lwt.return_unit
|
||||||
| Some [] -> Lwt.return_unit
|
|
||||||
| Some _changes -> download_archives disk http_ctx git_kv
|
| Some _changes -> download_archives disk http_ctx git_kv
|
||||||
in
|
in
|
||||||
let service =
|
let service =
|
||||||
|
|
Loading…
Reference in a new issue