Fix re-evaluation
This commit is contained in:
parent
e185f9251b
commit
4c5967c0a1
@ -227,16 +227,20 @@ checkOrInsertEvaluation repoDir forceEvaluation chan version out = do
|
|||||||
asPercentage = False }
|
asPercentage = False }
|
||||||
msg chan $ concat [ "Evaluated! Score ", (T.pack $ formatTheResult defaultFormattingOpts result) ]
|
msg chan $ concat [ "Evaluated! Score ", (T.pack $ formatTheResult defaultFormattingOpts result) ]
|
||||||
time <- liftIO getCurrentTime
|
time <- liftIO getCurrentTime
|
||||||
if forceEvaluation
|
let (pointResult, errorBound) = extractResult result
|
||||||
|
if (isJust maybeEvaluation)
|
||||||
then
|
then
|
||||||
runDB $ deleteWhere [
|
runDB $ updateWhere [
|
||||||
EvaluationTest ==. outTest out,
|
EvaluationTest ==. outTest out,
|
||||||
EvaluationChecksum ==. outChecksum out,
|
EvaluationChecksum ==. outChecksum out,
|
||||||
EvaluationVersion ==. version ]
|
EvaluationVersion ==. version ]
|
||||||
|
[ EvaluationScore =. Just pointResult,
|
||||||
|
EvaluationErrorBound =. errorBound,
|
||||||
|
EvaluationErrorMessage =. Nothing,
|
||||||
|
EvaluationStamp =. time ]
|
||||||
else
|
else
|
||||||
return ()
|
do
|
||||||
_ <- runDB $ insert $ let (pointResult, errorBound) = extractResult result
|
_ <- runDB $ insert $ Evaluation {
|
||||||
in Evaluation {
|
|
||||||
evaluationTest=outTest out,
|
evaluationTest=outTest out,
|
||||||
evaluationChecksum=outChecksum out,
|
evaluationChecksum=outChecksum out,
|
||||||
evaluationScore=Just pointResult,
|
evaluationScore=Just pointResult,
|
||||||
@ -244,6 +248,7 @@ checkOrInsertEvaluation repoDir forceEvaluation chan version out = do
|
|||||||
evaluationErrorMessage=Nothing,
|
evaluationErrorMessage=Nothing,
|
||||||
evaluationStamp=time,
|
evaluationStamp=time,
|
||||||
evaluationVersion=version }
|
evaluationVersion=version }
|
||||||
|
return ()
|
||||||
msg chan "Evaluation done"
|
msg chan "Evaluation done"
|
||||||
Right (Right (_, Just _)) -> do
|
Right (Right (_, Just _)) -> do
|
||||||
err chan "Unexpected multiple results (???)"
|
err chan "Unexpected multiple results (???)"
|
||||||
|
Loading…
Reference in New Issue
Block a user