def activate(self): Component.activate(self) # Late import to speed up application startup. from cheroot import wsgi self.wsgi_server = wsgi.Server(\ ("0.0.0.0", self.port), self.wsgi_app, server_name="localhost", numthreads=1, timeout=5)
def activate_components(self): Component.activate(self) # Also activates GUI components. self.component_manager.register(\ self.Scheduler(self.component_manager)) self.scheduler().activate() self.log().started_scheduler() self.component_manager.register(\ self.ReviewController(self.component_manager)) self.review_controller().activate()
def activate(self): Component.activate(self) self._timestamp = None self.upload_thread = None self.archive_old_log() self.start_logging() if self.config()["upload_science_logs"]: from mnemosyne.libmnemosyne.log_uploader import LogUploader self.upload_thread = LogUploader(self.component_manager) self.upload_thread.start() self.active = True
def activate(self): Component.activate(self) if self.config()["run_web_server"]: # Restart the thread to have the new settings take effect. self.deactivate() try: self.thread = ServerThread( port=self.config()["web_server_port"], data_dir=self.config().data_dir, config_dir=self.config().config_dir, filename=self.config()["last_database"], component_manager=self.component_manager) except socket.error as exception: (errno, e) = exception.args if errno == 98: self.main_widget().show_error(\ _("Unable to start web server.") + " " + \ _("There still seems to be an old server running on the requested port.")\ + " " + _("Terminate that process and try again.")) self.thread = None return elif errno == 13: self.main_widget().show_error(\ _("Unable to start web server.") + " " + \ _("You don't have the permission to use the requested port.")) self.thread = None return else: raise e self.thread.review_started_signal.connect(\ self.unload_database) self.thread.review_ended_signal.connect(\ self.load_database) self.thread.information_signal.connect(\ self.threaded_show_information) self.thread.error_signal.connect(\ self.threaded_show_error) self.thread.question_signal.connect(\ self.threaded_show_question) self.thread.set_progress_text_signal.connect(\ self.true_main_widget.set_progress_text) self.thread.set_progress_range_signal.connect(\ self.true_main_widget.set_progress_range) self.thread.set_progress_update_interval_signal.connect(\ self.true_main_widget.set_progress_update_interval) self.thread.increase_progress_signal.connect(\ self.true_main_widget.increase_progress) self.thread.set_progress_value_signal.connect(\ self.true_main_widget.set_progress_value) self.thread.close_progress_signal.connect(\ self.true_main_widget.close_progress) self.thread.start()
def activate(self): Component.activate(self) self.fill_dirs() self.load() self.load_user_config() self.set_defaults()
def activate(self): Component.activate(self) self.set_language(self.config()["ui_language"])
def activate(self): Component.activate(self) self.exec_()