LGTM, thanks

(Jose just mentioned that he has seen GHC making a difference between '_ <-
x' and just 'x'. I thought there is no difference, at least in the
mathematical sense, but perhaps there is some.)


On Wed, Jan 15, 2014 at 1:14 PM, Klaus Aehlig <[email protected]> wrote:

> On Wed, Jan 15, 2014 at 01:03:16PM +0100, Petr Pudlák wrote:
> > LGTM, thanks
> >
> > (Just nitpicking: instead of 'do _ <- ...' we can write just 'do ...' (or
> > was it intentional?))
>
> Yes, you're right; I forgot that replicateManyJobs already discards any
> errors and has type .. -> IO ().
>
> I also realized that two lines ended in whitespace; so I'd like to include
> the following interdiff.
>
> commit 0c0bfe7dfdac96c9e3bfab6fe5986040975712f5
> Author: Klaus Aehlig <[email protected]>
> Date:   Wed Jan 15 13:14:21 2014 +0100
>
>     Interdiff [PATCH master 4/4] Implement job cancellation in luxid
>
> diff --git a/src/Ganeti/Query/Server.hs b/src/Ganeti/Query/Server.hs
> index 9556fe3..93b47d1 100644
> --- a/src/Ganeti/Query/Server.hs
> +++ b/src/Ganeti/Query/Server.hs
> @@ -312,7 +312,7 @@ handleCall _ qstat  cfg (CancelJob jid) = do
>        qDir <- queueDir
>        readResult <- loadJobFromDisk qDir True jid
>        let jobFileFailed = return . Ok . showJSON . (,) False
> -                            . (++) ("Dequeued " ++ jName
> +                            . (++) ("Dequeued " ++ jName
>                                      ++ ", but failed to mark as
> cancelled: ")
>                            :: String -> IO (ErrorResult JSValue)
>        case readResult of
> @@ -322,10 +322,10 @@ handleCall _ qstat  cfg (CancelJob jid) = do
>            let job' = cancelQueuedJob now job
>                mcs = Config.getMasterCandidates cfg
>            write_result <- writeJobToDisk qDir job'
> -          case write_result of
> +          case write_result of
>              Bad s -> jobFileFailed s
>              Ok () -> do
> -              _ <- replicateManyJobs qDir mcs [job']
> +              replicateManyJobs qDir mcs [job']
>                return . Ok . showJSON $ (True, "Dequeued " ++ jName)
>      Ok False -> do
>        logDebug $ jName ++ " not queued; trying to cancel directly"
>
>
>
>
> --
> 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