From 4dbf64ecfc4a2a3b318d0cae8c4e4f63937d8d57 Mon Sep 17 00:00:00 2001 From: Filip Gralinski Date: Sat, 14 Jul 2018 07:38:55 +0200 Subject: [PATCH] clean up variants --- Handler/ShowChallenge.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Handler/ShowChallenge.hs b/Handler/ShowChallenge.hs index ed40ad0..d3d8170 100644 --- a/Handler/ShowChallenge.hs +++ b/Handler/ShowChallenge.hs @@ -279,7 +279,7 @@ getOuts chan submissionId = do activeTests <- runDB $ selectList [TestChallenge ==. challengeId, TestActive ==. True] [] testsDone <- filterM (liftIO . doesOutExist repoDir) activeTests theVariant <- getVariant submissionId "out" - outs <- mapM (outForTest repoDir submissionId theVariant) testsDone + outs <- mapM (outForTest repoDir theVariant) testsDone mapM_ checkOrInsertOut outs mapM_ (checkOrInsertEvaluation repoDir chan) outs return outs @@ -300,8 +300,8 @@ doesOutExist repoDir (Entity _ test) = do result <- findOutFile repoDir test return $ isJust result -outForTest :: MonadIO m => FilePath -> Key Submission -> Key Variant -> Entity Test -> m Out -outForTest repoDir submissionId variantId (Entity testId test) = do +outForTest :: MonadIO m => FilePath -> Key Variant -> Entity Test -> m Out +outForTest repoDir variantId (Entity testId test) = do (Just outF) <- liftIO $ findOutFile repoDir test checksum <- liftIO $ gatherSHA1ForCollectionOfFiles [outF] return Out {