def post(self, id): # id = self.get_argument('id') cmd = self.get_argument('cmd').strip() + ' ' + self.get_argument('option').strip() \ + ' ' + self.get_argument('file').strip() self.process = GeneralSubprocess(1, cmd) global tasks tasks[id] = self.process.run_process() self.render("start.html", id=id)
class StartHandler(RequestHandler): def initialize(self): self.process = None @coroutine def post(self, id): # id = self.get_argument('id') cmd = self.get_argument('cmd').strip() + ' ' + self.get_argument('option').strip() \ + ' ' + self.get_argument('file').strip() self.process = GeneralSubprocess(1, cmd) global tasks tasks[id] = self.process.run_process() self.render("start.html", id=id)