def report_log(client_id, server_id, ret, command_type, output, params): client_run_log = ClientRunLog() client_run_log.client_id = client_id client_run_log.status = ret client_run_log.content = output client_run_log.extinfo = json.dumps(params) client_run_log.command_type = command_type client_run_log.server_id = server_id client_run_log.persist()
def get_client_run_log_list(client_id, page, pagesize): return ClientRunLog.paging(page, pagesize, condition="client_id=%s" % client_id, order="id desc")