Skip to content

Commit 0e74404

Browse files
gabelevifacebook-github-bot
authored andcommitted
Use EventLoggerLwt in Flow
Reviewed By: samwgoldman Differential Revision: D7272142 fbshipit-source-id: 51e90b3b3bdcb29a98971bd612cd9ec0228de02c
1 parent 9bc56ac commit 0e74404

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/monitor/flowServerMonitor.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ module LogFlusher = LwtLoop.Make (struct
6363

6464
let main () =
6565
let%lwt () = Lwt_unix.sleep 5.0 in
66-
EventLogger.flush ();
67-
Lwt.return_unit
66+
EventLoggerLwt.flush ()
6867

6968
let catch () exn =
7069
Logger.fatal ~exn "LogFlusher somehow hit an exception";

src/server/server.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,9 @@ let rec serve ~dfind ~genv ~env =
183183
~default:(Lwt.return env)
184184
~f:(process_message genv env) in
185185

186-
EventLogger.flush ();
186+
(* Flush the logs asynchronously *)
187+
Lwt.async EventLoggerLwt.flush;
188+
187189
serve ~dfind ~genv ~env
188190

189191
(* This code is only executed when the options --check is NOT present *)

0 commit comments

Comments
 (0)