from tornado.web import RequestHandler from tfw.config.logs import logging log = logging.getLogger(__name__) class SolutionCheckHandler(RequestHandler): def initialize(self, solvable_connector): self.solvable_connector = solvable_connector def get(self): log.debug('Sending request to solvable') self.solvable_connector.send('solution_check', {}) resp_key, resp_data = self.solvable_connector.recv() log.debug('Received answer from solvable') self.write(resp_data)