From 4c511c3c6634af9d57b985ccfe7b222c5fe08220 Mon Sep 17 00:00:00 2001 From: Brian Wilson Date: Thu, 4 Apr 2013 11:14:52 -0400 Subject: [PATCH] add progress logging --- .../courseware/management/commands/remove_input_state.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/djangoapps/courseware/management/commands/remove_input_state.py b/lms/djangoapps/courseware/management/commands/remove_input_state.py index 9adabeafc9..e45d08e351 100644 --- a/lms/djangoapps/courseware/management/commands/remove_input_state.py +++ b/lms/djangoapps/courseware/management/commands/remove_input_state.py @@ -76,6 +76,11 @@ class Command(BaseCommand): for hist_module in hist_modules: self.remove_studentmodulehistory_input_state(hist_module, save_changes) + if self.num_visited % 1000 == 0: + LOG.info(" Progress: updated {0} of {1} student modules".format(self.num_changed, self.num_visited)) + LOG.info(" Progress: updated {0} of {1} student history modules".format(self.num_hist_changed, + self.num_hist_visited)) + @transaction.autocommit def remove_studentmodule_input_state(self, module, save_changes): ''' Fix the grade assigned to a StudentModule'''