diff --git a/bin/migrations/m20210712c.ml b/bin/migrations/m20210712c.ml index 46b2cd5..60c9582 100644 --- a/bin/migrations/m20210712c.ml +++ b/bin/migrations/m20210712c.ml @@ -133,7 +133,7 @@ let rename_build = let console_to_string console = Asn.console_of_cs 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) console |> String.concat "" diff --git a/lib/model.ml b/lib/model.ml index 6f03b27..c9c483d 100644 --- a/lib/model.ml +++ b/lib/model.ml @@ -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_staging name = Fpath.(staging_dir / name + "txt") in 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) console |> String.concat ""