def update_task(job_id, component_name, task_id, task_version, role, party_id): task_info = {} task_info.update(request.json) task_info.update({ "job_id": job_id, "task_id": task_id, "task_version": task_version, "role": role, "party_id": party_id, }) TaskController.update_task(task_info=task_info) return get_json_result(retcode=0, retmsg='success')
def report_task(job_id, component_name, task_id, task_version, role, party_id): task_info = {} task_info.update(request.json) task_info.update({ "job_id": job_id, "task_id": task_id, "task_version": task_version, "role": role, "party_id": party_id, }) TaskController.update_task(task_info=task_info) if task_info.get("party_status"): if not TaskController.update_task_status(task_info=task_info): return get_json_result(retcode=RetCode.OPERATING_ERROR, retmsg="update task status failed") return get_json_result(retcode=0, retmsg='success')
def report_task(job_id, component_name, task_id, task_version, role, party_id): task_info = {} task_info.update(request.json) task_info.update({ "job_id": job_id, "task_id": task_id, "task_version": task_version, "role": role, "party_id": party_id, }) TaskController.update_task(task_info=task_info) if task_info.get("party_status"): if not TaskController.update_task_status(task_info=task_info): return get_json_result( retcode=RetCode.NOT_EFFECTIVE, retmsg="update job status does not take effect") return get_json_result(retcode=0, retmsg='success')