Commit bdaeb637 authored by Fardale's avatar Fardale

ocamlformat

parent 23fc68d0
......@@ -36,13 +36,14 @@ let cmd id delete addr port pass () =
jobs
|> Array.of_list
|> fun jobs ->
Array.init (Array.length jobs + 1) (fun i ->
if i = 0 then
[| PrintBox.text "ID"
; PrintBox.text "ARG"|]
else
[| PrintBox.sprintf "%i" (fst jobs.(i-1).id)
; PrintBox.text (String.concat " " jobs.(i-1).args) |])
Array.init
(Array.length jobs + 1)
(fun i ->
if i = 0 then [|PrintBox.text "ID"; PrintBox.text "ARG"|]
else
[| PrintBox.sprintf "%i" (fst jobs.(i - 1).id)
; PrintBox.text (String.concat " " jobs.(i - 1).args)
|])
|> PrintBox.grid |> PrintBox.frame
|> PrintBox_text.output stdout ;
Format.printf "@." ;
......
......@@ -146,7 +146,7 @@ let server_handler pass port sockaddr (ic, oc) =
try fst (CCDeque.peek_back jobs).id with CCDeque.Empty -> 0
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) )
else
(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