From e54b985815fbbc637d8f4681ac55b3d46e2263a3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 19 Feb 2021 09:27:12 +0100 Subject: [PATCH] fix(files): count personalised sheet files as alive --- src/Jobs/Handler/Files.hs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Jobs/Handler/Files.hs b/src/Jobs/Handler/Files.hs index 10330e158..6c44b230d 100644 --- a/src/Jobs/Handler/Files.hs +++ b/src/Jobs/Handler/Files.hs @@ -65,6 +65,7 @@ fileReferences (E.just -> fHash) , E.from $ \matFile -> E.where_ $ matFile E.^. MaterialFileContent E.==. fHash , E.from $ \newsFile -> E.where_ $ newsFile E.^. CourseNewsFileContent E.==. fHash , E.from $ \sheetFile -> E.where_ $ sheetFile E.^. SheetFileContent E.==. fHash + , E.from $ \sheetFile -> E.where_ $ sheetFile E.^. PersonalisedSheetFileContent E.==. fHash , E.from $ \appInstr -> E.where_ $ appInstr E.^. CourseAppInstructionFileContent E.==. fHash , E.from $ \matching -> E.where_ $ E.just (matching E.^. AllocationMatchingLog) E.==. fHash , E.from $ \subFile -> E.where_ $ subFile E.^. SubmissionFileContent E.==. fHash @@ -133,14 +134,15 @@ dispatchJobDetectMissingFiles = JobHandlerAtomicWithFinalizer act fin $logInfoS "MissingFiles" [st|No missing files|] trackedReferences = Map.fromList $ over (traverse . _1) nameToPathPiece - [ (''CourseApplicationFile, E.from $ \appFile -> return $ appFile E.^. CourseApplicationFileContent ) - , (''MaterialFile, E.from $ \matFile -> return $ matFile E.^. MaterialFileContent ) - , (''CourseNewsFile, E.from $ \newsFile -> return $ newsFile E.^. CourseNewsFileContent ) - , (''SheetFile, E.from $ \sheetFile -> return $ sheetFile E.^. SheetFileContent ) - , (''CourseAppInstructionFile, E.from $ \appInstr -> return $ appInstr E.^. CourseAppInstructionFileContent) - , (''SubmissionFile, E.from $ \subFile -> return $ subFile E.^. SubmissionFileContent ) - , (''SessionFile, E.from $ \sessFile -> return $ sessFile E.^. SessionFileContent ) - , (''AllocationMatching, E.from $ \matching -> return . E.just $ matching E.^. AllocationMatchingLog ) + [ (''CourseApplicationFile, E.from $ \appFile -> return $ appFile E.^. CourseApplicationFileContent ) + , (''MaterialFile, E.from $ \matFile -> return $ matFile E.^. MaterialFileContent ) + , (''CourseNewsFile, E.from $ \newsFile -> return $ newsFile E.^. CourseNewsFileContent ) + , (''SheetFile, E.from $ \sheetFile -> return $ sheetFile E.^. SheetFileContent ) + , (''PersonalisedSheetFile, E.from $ \personalisedSheetFile -> return $ personalisedSheetFile E.^. PersonalisedSheetFileContent ) + , (''CourseAppInstructionFile, E.from $ \appInstr -> return $ appInstr E.^. CourseAppInstructionFileContent) + , (''SubmissionFile, E.from $ \subFile -> return $ subFile E.^. SubmissionFileContent ) + , (''SessionFile, E.from $ \sessFile -> return $ sessFile E.^. SessionFileContent ) + , (''AllocationMatching, E.from $ \matching -> return . E.just $ matching E.^. AllocationMatchingLog) ]