def cleanup_agent(self): systemstats.clean_up_all() if self.intrusion_detection: self.intrusion_detection.stop() if self.db_cleaner: self.g_logger.debug("Shutting down the db cleaner runner") self.db_cleaner.done() self.db_cleaner.join() self.g_logger.debug("Shutting down the job runner") self.conf.stop_job_runner() if self.request_listener: self.g_logger.debug("Stopping the reply listener") self.request_listener.shutdown() if self.disp: self.g_logger.debug("Stopping the dispatcher") self.disp.stop() if self.conn: self.g_logger.debug("Closing the connection") self.conn.close() self.g_logger.debug("Waiting for all threads and callbacks in the " "event system.") events.global_space.reset() self.g_logger.debug("Service closed")
def tearDown(self): systemstats.clean_up_all()