Commit bdaeb637 authored by Fardale's avatar Fardale
Browse files

ocamlformat

parent 23fc68d0
...@@ -36,13 +36,14 @@ let cmd id delete addr port pass () = ...@@ -36,13 +36,14 @@ let cmd id delete addr port pass () =
jobs jobs
|> Array.of_list |> Array.of_list
|> fun jobs -> |> fun jobs ->
Array.init (Array.length jobs + 1) (fun i -> Array.init
if i = 0 then (Array.length jobs + 1)
[| PrintBox.text "ID" (fun i ->
; PrintBox.text "ARG"|] if i = 0 then [|PrintBox.text "ID"; PrintBox.text "ARG"|]
else else
[| PrintBox.sprintf "%i" (fst jobs.(i-1).id) [| PrintBox.sprintf "%i" (fst jobs.(i - 1).id)
; PrintBox.text (String.concat " " jobs.(i-1).args) |]) ; PrintBox.text (String.concat " " jobs.(i - 1).args)
|])
|> PrintBox.grid |> PrintBox.frame |> PrintBox.grid |> PrintBox.frame
|> PrintBox_text.output stdout ; |> PrintBox_text.output stdout ;
Format.printf "@." ; Format.printf "@." ;
......
...@@ -146,7 +146,7 @@ let server_handler pass port sockaddr (ic, oc) = ...@@ -146,7 +146,7 @@ let server_handler pass port sockaddr (ic, oc) =
try fst (CCDeque.peek_back jobs).id with CCDeque.Empty -> 0 try fst (CCDeque.peek_back jobs).id with CCDeque.Empty -> 0
in in
let id = CCOpt.get_or ~default:last_id id in let id = CCOpt.get_or ~default:last_id id in
CCDeque.filter_in_place jobs (fun j -> fst j.id != id); CCDeque.filter_in_place jobs (fun j -> fst j.id != id) ;
Logs_lwt.info (fun m -> m "Removing jobs with id %i" id) ) Logs_lwt.info (fun m -> m "Removing jobs with id %i" id) )
else else
(let jobs_list = (let jobs_list =
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment