def patch(): """暂停/恢复调度任务""" payload = get_payload() params = Response(dispatch_id=payload.get('dispatch_id', []), action=int(payload.get('action', 0))) log.info('暂停/恢复调度任务[params: %s]' % str(params)) return params
def post(): """新增执行服务器""" payload = get_payload() params = Response(server_host=payload.get('server_host', ''), server_name=payload.get('server_name', '')) log.info('新增执行服务器[params: %s]' % str(params)) return params
def post(): """新增接口""" payload = get_payload() params = Response(interface_name=payload.get('interface_name', ''), interface_desc=payload.get('interface_desc', ''), retry=int(payload.get('retry', 0))) log.info('新增接口[params: %s]' % str(params)) return params
def post(): """断点续跑""" payload = get_payload() params = Response( exec_id=payload.get('exec_id', []) ) log.info('执行任务断点续跑[params: %s]' % str(params)) return params
def post(): """立即执行任务""" payload = get_payload() params = Response(job_id=int(payload.get('job_id', 0)), run_date=payload.get('run_date', ''), date_format=payload.get('date_format', '')) log.info('立即执行任务[params: %s]' % str(params)) return params
def delete(): """批量删除参数""" payload = get_payload() params = Response( param_id_arr=payload.get('param_id_arr', []) ) log.info('批量删除任务流[params: %s]' % str(params)) return params
def patch(): """暂停/恢复调度事件""" payload = get_payload() params = Response( ftp_event_id=payload.get('ftp_event_id', []), action=int(payload.get('action', 0)) ) log.info('暂停/恢复调度事件[params: %s]' % str(params)) return params
def post(): """登入""" payload = get_payload() username = payload.get('username', '') password = payload.get('password', '') params = Response(username=username, password=password) log.info('用户登录[params: %s]' % str(params)) return params
def post(): """测试SQL参数""" payload = get_payload() params = Response( source_id=int(payload.get('source_id', 0)), param_value=payload.get('param_value', '') ) log.info('SQL参数测试[params: %s]' % params) return params
def post(): """立即执行调度任务""" payload = get_payload() params = Response(dispatch_id=payload.get('dispatch_id', []), run_date=payload.get('run_date', ''), date_format=payload.get('date_format', ''), is_after=int(payload.get('is_after', 1))) log.info('立即执行调度任务[params: %s]' % str(params)) return params
def put(server_id): """修改执行服务器详情""" payload = get_payload() params = Response(server_id=server_id, server_host=payload.get('server_host', ''), server_name=payload.get('server_name', ''), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改执行服务器详情[params: %s]' % str(params)) return params
def put(interface_id): """修改接口详情""" payload = get_payload() params = Response(interface_id=interface_id, interface_name=payload.get('interface_name', ''), interface_desc=payload.get('interface_desc', ''), retry=int(payload.get('retry', 0)), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改接口详情[params: %s]' % str(params)) return params
def post(): """新增预警配置""" payload = get_payload() params = Response(alert_channel=int(payload.get('alert_channel', 0)), conf_name=payload.get('conf_name', ''), param_config=payload.get('param_config', ''), param_host=payload.get('param_host', ''), param_pass=payload.get('param_pass', '')) log.info('修改预警配置详情[params: %s]' % str(params)) return params
def post(): """立即执行调度事件""" payload = get_payload() params = Response( ftp_event_id=payload.get('ftp_event_id', []), run_date=payload.get('run_date', ''), date_format=payload.get('date_format', '') ) log.info('立即执行调度事件[params: %s]' % str(params)) return params
def post(): """新增任务流""" payload = get_payload() params = Response(interface_name=payload.get('interface_name', ''), interface_desc=payload.get('interface_desc', ''), interface_index=payload.get('interface_index', ''), parent_interface=payload.get('parent_interface', ''), run_time=payload.get('run_time', ''), retry=int(payload.get('retry', 0))) log.info('新增任务流[params: %s]' % str(params)) return params
def post(): """测试FTP连接""" payload = get_payload() params = Response(ftp_id=int(payload.get('ftp_id', 0)), ftp_type=int(payload.get('ftp_type', 0)), ftp_host=payload.get('ftp_host', ''), ftp_port=int(payload.get('ftp_port', 0)), ftp_user=payload.get('ftp_user', ''), ftp_passwd=payload.get('ftp_passwd', '')) log.info('测试FTP连接[params: %s]' % str(params)) return params
def post(): """新增FTP配置详情""" payload = get_payload() params = Response(ftp_name=payload.get('ftp_name', ''), ftp_desc=payload.get('ftp_desc', ''), ftp_type=int(payload.get('ftp_type', 0)), ftp_host=payload.get('ftp_host', ''), ftp_port=int(payload.get('ftp_port', 0)), ftp_user=payload.get('ftp_user', ''), ftp_passwd=payload.get('ftp_passwd', '')) log.info('新增FTP配置[params: %s]' % str(params)) return params
def post(): """新增调度预警""" payload = get_payload() params = Response(dispatch_id=int(payload.get('dispatch_id', 0)), alert_s=int(payload.get('alert_s', 0)), alert_f=int(payload.get('alert_f', 0)), conf_id_s=int(payload.get('conf_id_s', 0)), conf_id_f=int(payload.get('conf_id_f', 0)), send_mail_s=payload.get('send_mail_s', ''), send_mail_f=payload.get('send_mail_f', '')) log.info('新增执行流预警[params: %s]' % str(params)) return params
def post(): """新增任务""" payload = get_payload() params = Response(job_name=payload.get('job_name', ''), interface_id=int(payload.get('interface_id', 0)), job_prep=payload.get('job_prep', ''), job_desc=payload.get('job_desc', ''), server_id=int(payload.get('server_id', 0)), server_dir=payload.get('server_dir', ''), server_script=payload.get('server_script', '')) log.info('新增任务[params: %s]' % str(params)) return params
def post(): """新增调度""" payload = get_payload() params = Response(interface_id=int(payload.get('interface_id', '')), dispatch_name=payload.get('dispatch_name', ''), dispatch_desc=payload.get('dispatch_desc', ''), minute=payload.get('minute', ''), hour=payload.get('hour', 0), day=payload.get('day', ''), month=payload.get('month', ''), week=payload.get('week', '')) log.info('新增调度[params: %s]' % str(params)) return params
def post(): """新增参数""" payload = get_payload() params = Response( param_type=int(payload.get('param_type', 0)), param_name=payload.get('param_name', ''), param_index=payload.get('param_index', ''), source_id=int(payload.get('source_id', 0)), param_value=payload.get('param_value', ''), param_desc=payload.get('param_desc', '') ) log.info('新增参数[params: %s]' % str(params)) return params
def put(conf_id): """修改预警配置详情""" payload = get_payload() params = Response(conf_id=conf_id, alert_channel=int(payload.get('alert_channel', 0)), conf_name=payload.get('conf_name', ''), param_config=payload.get('param_config', ''), param_host=payload.get('param_host', ''), param_port=int(payload.get('param_port', 0)), param_pass=payload.get('param_pass', ''), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改预警配置详情[params: %s]' % str(params)) return params
def post(): """新增数据源""" payload = get_payload() params = Response(source_name=payload.get('source_name', ''), source_type=int(payload.get('source_type', 0)), auth_type=int(payload.get('auth_type', 0)), source_host=payload.get('source_host', ''), source_port=int(payload.get('source_port', 0)), source_database=payload.get('source_database', ''), source_user=payload.get('source_user', ''), source_password=payload.get('source_password', ''), source_desc=payload.get('source_desc', '')) log.info('新增数据源[params: %s]' % str(params)) return params
def put(dispatch_id): """修改调度预警详情""" payload = get_payload() params = Response(dispatch_id=dispatch_id, alert_s=int(payload.get('alert_s', 0)), alert_f=int(payload.get('alert_f', 0)), alert_id_s=int(payload.get('alert_id_s', -1)), alert_id_f=int(payload.get('alert_id_f', -1)), conf_id_s=int(payload.get('conf_id_s', 0)), conf_id_f=int(payload.get('conf_id_f', 0)), send_mail_s=payload.get('send_mail_s', ''), send_mail_f=payload.get('send_mail_f', '')) log.info('修改调度预警详情[params: %s]' % str(params)) return params
def put(interface_id): """修改任务流详情""" payload = get_payload() params = Response(interface_id=interface_id, interface_name=payload.get('interface_name', ''), interface_desc=payload.get('interface_desc', ''), interface_index=payload.get('interface_index', ''), old_parent=payload.get('old_parent', ''), parent_interface=payload.get('parent_interface', ''), run_time=payload.get('run_time', ''), retry=int(payload.get('retry', 0)), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改任务流详情[params: %s]' % str(params)) return params
def put(ftp_id): """修改FTP配置""" payload = get_payload() params = Response(ftp_id=ftp_id, ftp_name=payload.get('ftp_name', ''), ftp_desc=payload.get('ftp_desc', ''), ftp_type=int(payload.get('ftp_type', 0)), ftp_host=payload.get('ftp_host', ''), ftp_port=int(payload.get('ftp_port', 0)), ftp_user=payload.get('ftp_user', ''), ftp_passwd=payload.get('ftp_passwd', ''), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改FTP配置[params: %s]' % str(params)) return params
def put(param_id): """修改参数""" payload = get_payload() params = Response( param_id=param_id, param_type=int(payload.get('param_type', 0)), param_name=payload.get('param_name', ''), param_index=payload.get('param_index', ''), source_id=int(payload.get('source_id', 0)), param_value=payload.get('param_value', ''), param_desc=payload.get('param_desc', ''), is_deleted=int(payload.get('is_deleted', 0)) ) log.info('修改参数[params: %s]' % str(params)) return params
def put(job_id): """修改任务""" payload = get_payload() params = Response(job_id=job_id, interface_id=int(payload.get('interface_id', 0)), job_name=payload.get('job_name', ''), job_desc=payload.get('job_desc', ''), server_id=int(payload.get('server_id', 0)), server_dir=payload.get('server_dir', ''), server_script=payload.get('server_script', ''), old_prep=payload.get('old_prep', ''), job_prep=payload.get('job_prep', ''), is_deleted=int(payload.get('is_deleted', 0))) log.info('修改任务[params: %s]' % str(params)) return params
def post(): """测试数据源连接""" payload = get_payload() params = Response( source_id=int(payload.get('source_id', 0)), source_type=int(payload.get('source_type', 0)), auth_type=int(payload.get('auth_type', 0)), source_host=payload.get('source_host', ''), source_port=int(payload.get('source_port', 0)), source_database=payload.get('source_database', ''), source_user=payload.get('source_user', ''), source_password=payload.get('source_password', ''), ) log.info('测试数据源连接[params: %s]' % str(params)) return params
def put(dispatch_id): """修改调度详情""" payload = get_payload() params = Response(dispatch_id=dispatch_id, interface_id=int(payload.get('interface_id', 0)), dispatch_name=payload.get('dispatch_name', ''), dispatch_desc=payload.get('dispatch_desc', ''), minute=payload.get('minute', ''), hour=payload.get('hour', ''), day=payload.get('day', ''), month=payload.get('month', ''), week=payload.get('week', ''), old_status=int(payload.get('old_status', 0)), new_status=int(payload.get('new_status', 0))) log.info('修改调度详情[params: %s]' % str(params)) return params