From fcd69e04ad01a2e7e12dbf3b1f7b5447b2ee5975 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Sat, 4 May 2024 15:23:33 -0700 Subject: [PATCH] Add duplicate log consolidation to sync hooks. --- kolibri/core/logger/kolibri_plugin.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/kolibri/core/logger/kolibri_plugin.py b/kolibri/core/logger/kolibri_plugin.py index 57306cc4221..5953ceb1a78 100644 --- a/kolibri/core/logger/kolibri_plugin.py +++ b/kolibri/core/logger/kolibri_plugin.py @@ -36,11 +36,6 @@ def upgrade(self, context): ) -@register_hook -class LoggerSyncHook(FacilityDataSyncHook): - cleanup_operations = [ExamLogsCompatibilityOperation()] - - class AttemptLogsConsolidationOperation(KolibriVersionedSyncOperation): version = "0.16.0" @@ -60,3 +55,11 @@ def upgrade(self, context): consolidate_quiz_attempt_logs( AttemptLog.objects.filter(id__in=attempt_logs_ids) ) + + +@register_hook +class LoggerSyncHook(FacilityDataSyncHook): + cleanup_operations = [ + ExamLogsCompatibilityOperation(), + AttemptLogsConsolidationOperation(), + ]