On Thu, Apr 23, 2015 at 07:56:29PM +0300, Oleg Ponomarev wrote:
> Currently only not yet submitted jobs are showed. This patch
> Adds printing already submitted jobs, their ID's and statuses on
> user cancel interrupt. That is requested in Issue 357.
> 
> Submitted jobs, their ID's and statuses are
> accumulated in 'submitted' list. This way we only accumulate jobs
> submitted by execWithCancel. The problem is that jobs submitted
> directly via submitJobs are not accumulated. But that's not really
> a problem because submitJobs is used only from Harep and in that
> case even cancel signal handler is not registered because there is
> no execWithCancel call in Harep.
> 
> Signed-off-by: Oleg Ponomarev <[email protected]>
> ---
>  src/Ganeti/Jobs.hs | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)

LGTM, except for a small hlint error.

> -                . commaJoin . map (show . fromJobId)
> +                . commaJoin . map (show . fromJobId)
> +        jobs_info ji = zip (map (fromJobId . fst) ji) $ (map snd ji)

the last parenthesis is redundant. If you agree, I'll change your patch
as follows

diff --git a/src/Ganeti/Jobs.hs b/src/Ganeti/Jobs.hs
index faf0790..01c2ac8 100644
--- a/src/Ganeti/Jobs.hs
+++ b/src/Ganeti/Jobs.hs
@@ -97,7 +97,7 @@ execJobSet anno master cref ((opcodes, descr):jobs) submitted 
= do
   where metaopcodes = map (map anno) opcodes
         logfn = putStrLn . ("Got job IDs " ++)
                 . commaJoin . map (show . fromJobId)
-        jobs_info ji = zip (map (fromJobId . fst) ji) $ (map snd ji)
+        jobs_info ji = zip (map (fromJobId . fst) ji) $ map snd ji
 


and push. However, can you first sign the Contributer license agreement
at https://cla.developers.google.com/about/google-individual please?

Thanks,
Klaus

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to