minor nits
This commit is contained in:
parent
68849fecf3
commit
1adc67c297
1 changed files with 5 additions and 11 deletions
|
@ -81,10 +81,7 @@ let init_influx name data =
|
||||||
let setup_app level influx port host datadir cachedir configdir =
|
let setup_app level influx port host datadir cachedir configdir =
|
||||||
let dbpath = Printf.sprintf "%s/builder.sqlite3" datadir in
|
let dbpath = Printf.sprintf "%s/builder.sqlite3" datadir in
|
||||||
let datadir = Fpath.v datadir in
|
let datadir = Fpath.v datadir in
|
||||||
let cachedir = match cachedir with
|
let cachedir = Option.fold ~none:Fpath.(datadir / "_cache") ~some:Fpath.v in
|
||||||
| Some c -> Fpath.v c
|
|
||||||
| None -> Fpath.(datadir / "_cache")
|
|
||||||
in
|
|
||||||
let configdir = Fpath.v configdir in
|
let configdir = Fpath.v configdir in
|
||||||
let () = init_influx "builder-web" influx in
|
let () = init_influx "builder-web" influx in
|
||||||
match Builder_web.init dbpath datadir with
|
match Builder_web.init dbpath datadir with
|
||||||
|
@ -156,13 +153,10 @@ let influx =
|
||||||
Arg.(value & opt (some ip_port) None & info [ "influx" ] ~doc ~docv:"INFLUXHOST[:PORT]")
|
Arg.(value & opt (some ip_port) None & info [ "influx" ] ~doc ~docv:"INFLUXHOST[:PORT]")
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
let term = Term.(
|
let term =
|
||||||
const setup_app
|
Term.(const setup_app $ Logs_cli.level () $ influx $ port $ host $ datadir $
|
||||||
$ Logs_cli.level ()
|
cachedir $ configdir)
|
||||||
$ influx
|
in
|
||||||
$ port $ host
|
|
||||||
$ datadir $ cachedir $ configdir
|
|
||||||
) in
|
|
||||||
let info = Cmd.info "Builder web" ~doc:"Builder web" ~man:[] in
|
let info = Cmd.info "Builder web" ~doc:"Builder web" ~man:[] in
|
||||||
Cmd.v info term
|
Cmd.v info term
|
||||||
|> Cmd.eval
|
|> Cmd.eval
|
||||||
|
|
Loading…
Reference in a new issue