baseimage-tutorial-framework/src/controller/handlers/solution_check_handler.py
2018-02-12 18:04:59 +01:00

16 lines
536 B
Python

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
async def get(self):
log.debug('Sending request to solvable')
self.solvable_connector.send('solution_check', {})
resp_key, resp_data = await self.solvable_connector.recv()
log.debug('Received answer from solvable')
self.write(resp_data)