def _updater_thread(self): log = logging.getLogger('dmoj.updater') while True: self.updater_signal.wait() self.updater_signal.clear() if self.updater_exit: return # Prevent problem updates while grading. # Capture the value so it can't change. thread = self.current_submission_thread if thread: thread.join() try: clear_problem_dirs_cache() self.packet_manager.supported_problems_packet(get_supported_problems()) except Exception: log.exception('Failed to update problems.')
def _updater_thread(self): log = logging.getLogger('dmoj.updater') while True: self.updater_signal.wait() self.updater_signal.clear() if self.updater_exit: return # Prevent problem updates while grading. # Capture the value so it can't change. thread = self.current_submission_thread if thread: thread.join() try: clear_problem_dirs_cache() self.packet_manager.supported_problems_packet(get_supported_problems()) except Exception: log.exception('Failed to update problems.')
def _updater_thread(self) -> None: log = logging.getLogger('dmoj.updater') while True: self.updater_signal.wait() self.updater_signal.clear() if self.updater_exit: return # Prevent problem updates while grading. # Capture the value so it can't change. # FIXME(tbrindus): this is broken. # thread = sub_judge_thread # if thread: # thread.join() try: clear_problem_dirs_cache() self.packet_manager.supported_problems_packet(get_supported_problems()) except Exception: log.exception('Failed to update problems.')