baseimage-tutorial-framework/src/controller/handlers/solution_check_handler.py

16 lines
524 B
Python
Raw Normal View History

2018-02-08 15:26:28 +00:00
from tornado.web import RequestHandler
2018-02-09 13:06:11 +00:00
from tfw.config.logs import logging
log = logging.getLogger(__name__)
2018-02-08 15:26:28 +00:00
class SolutionCheckHandler(RequestHandler):
def initialize(self, solvable_connector):
self.solvable_connector = solvable_connector
def get(self):
2018-02-09 13:06:11 +00:00
log.debug('Sending request to solvable')
2018-02-08 15:26:28 +00:00
self.solvable_connector.send('solution_check', {})
resp_key, resp_data = self.solvable_connector.recv()
2018-02-09 13:06:11 +00:00
log.debug('Received answer from solvable')
2018-02-09 13:04:47 +00:00
self.write(resp_data)