Profilability
This commit is contained in:
parent
e2f9e30b58
commit
97ff546a73
|
@ -60,5 +60,8 @@ veryclean: clean thirdpartyclean
|
||||||
$(APP).native: $(wildcard *.ml)
|
$(APP).native: $(wildcard *.ml)
|
||||||
ocamlbuild -use-ocamlfind -X thirdparty -X scratch $@
|
ocamlbuild -use-ocamlfind -X thirdparty -X scratch $@
|
||||||
|
|
||||||
|
$(APP).p.native: $(wildcard *.ml)
|
||||||
|
ocamlbuild -use-ocamlfind -X thirdparty -X scratch $@
|
||||||
|
|
||||||
run: all
|
run: all
|
||||||
./$(APP).native
|
./$(APP).native
|
||||||
|
|
|
@ -35,6 +35,11 @@ let create_ready_file () =
|
||||||
| None ->
|
| None ->
|
||||||
return ()
|
return ()
|
||||||
|
|
||||||
|
let console_watcher () =
|
||||||
|
lwt _ = Lwt_io.read_line Lwt_io.stdin in
|
||||||
|
Server_control.milestone "Shutdown requested";
|
||||||
|
return ()
|
||||||
|
|
||||||
lwt _ =
|
lwt _ =
|
||||||
Printf.printf "%s %s, %s\n%s\n%!"
|
Printf.printf "%s %s, %s\n%s\n%!"
|
||||||
App_info.product App_info.version App_info.copyright App_info.licence_blurb;
|
App_info.product App_info.version App_info.copyright App_info.licence_blurb;
|
||||||
|
@ -54,8 +59,9 @@ lwt _ =
|
||||||
lwt () = Server_control.run_until "AMQP ready" in
|
lwt () = Server_control.run_until "AMQP ready" in
|
||||||
lwt () = Server_control.run_until "HTTP ready" in
|
lwt () = Server_control.run_until "HTTP ready" in
|
||||||
lwt () = Server_control.run_until "Hop ready" in
|
lwt () = Server_control.run_until "Hop ready" in
|
||||||
|
ignore (console_watcher ());
|
||||||
if Server_control.is_running ()
|
if Server_control.is_running ()
|
||||||
then (lwt () = create_ready_file () in
|
then (lwt () = create_ready_file () in
|
||||||
Server_control.milestone "Server initialized";
|
Server_control.milestone "Server initialized";
|
||||||
Server_control.run_forever ())
|
Server_control.run_until "Shutdown requested")
|
||||||
else return ()
|
else return ()
|
||||||
|
|
Loading…
Reference in New Issue