fix console output order

This commit is contained in:
Robur 2021-09-07 10:04:11 +00:00
parent 0efcec460d
commit f7823da321
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ let rename_build =
let console_to_string console = let console_to_string console =
Asn.console_of_cs console Asn.console_of_cs console
|> Rresult.R.reword_error (fun s -> `Msg s) >>| fun console -> |> Rresult.R.reword_error (fun s -> `Msg s) >>| fun console ->
List.map (fun (delta, data) -> List.rev_map (fun (delta, data) ->
Printf.sprintf "%.3fs:%s\n" (Duration.to_f (Int64.of_int delta)) data) Printf.sprintf "%.3fs:%s\n" (Duration.to_f (Int64.of_int delta)) data)
console console
|> String.concat "" |> String.concat ""

View file

@ -278,7 +278,7 @@ let save_console_and_script staging_dir datadir job_name uuid console script =
let out name = Fpath.(datadir / job_name / Uuidm.to_string uuid / name + "txt") in let out name = Fpath.(datadir / job_name / Uuidm.to_string uuid / name + "txt") in
let out_staging name = Fpath.(staging_dir / name + "txt") in let out_staging name = Fpath.(staging_dir / name + "txt") in
let console_to_string console = let console_to_string console =
List.map (fun (delta, data) -> List.rev_map (fun (delta, data) ->
Printf.sprintf "%.3fs:%s\n" (Duration.to_f (Int64.of_int delta)) data) Printf.sprintf "%.3fs:%s\n" (Duration.to_f (Int64.of_int delta)) data)
console console
|> String.concat "" |> String.concat ""