def filter(self, record): if self.request_id is not None and record.levelno >= logging.INFO: logentry = DB.Log(request_id=self.request_id, line=record.getMessage()) self.session.add(logentry) self.session.commit() return True
def do_recheck(self, subcmd, opts, request_id): """${cmd_name}: set request id to seen ${cmd_usage} ${cmd_option_list} """ request = self.session.query(DB.Request).filter(DB.Request.id == request_id).one() logentry = DB.Log(request_id = request_id, line = 'manually setting state to seen. previous state: %s (%s)'%(request.state, request.result)) request.state = 'seen' request.result = None self.session.add(logentry) self.session.commit()