Builder_web: Added timeout to visualization_cmd Lwt_process.pread

This commit is contained in:
rand00 2022-01-28 10:45:00 +01:00 committed by Reynir Björnsson
parent 2a1b75ba2b
commit 5a9c1237a1

View file

@ -188,7 +188,9 @@ let add_routes datadir =
let bin = "_build/default/bin/visualizations/builder_viz.exe" in let bin = "_build/default/bin/visualizations/builder_viz.exe" in
let cmd = bin, Array.of_list (bin :: args) let cmd = bin, Array.of_list (bin :: args)
in in
Lwt_process.pread ~stderr:`Dev_null cmd Lwt_process.pread cmd
~stderr:`Dev_null
~timeout:15.
|> Lwt_result.catch |> Lwt_result.catch
|> Lwt_result.map_err (fun exn -> |> Lwt_result.map_err (fun exn ->
Printexc.to_string exn, `Internal_Server_Error Printexc.to_string exn, `Internal_Server_Error