diff --git a/app/flow_template/robot/blank.bot b/app/flow_template/robot/blank.bot index dd115e6..f4e595c 100644 Binary files a/app/flow_template/robot/blank.bot and b/app/flow_template/robot/blank.bot differ diff --git a/app/flow_template/robot/package.json b/app/flow_template/robot/package.json index 517a2a1..9d95c81 100644 --- a/app/flow_template/robot/package.json +++ b/app/flow_template/robot/package.json @@ -11,7 +11,7 @@ ], "variables": [], "external_dependencies": [], - "uuid": "e4e85bb8-2da3-4824-a9eb-8d7da8fefaba", - "name": "测试-新建", + "uuid": "ca20d219-74c9-47fa-846b-26e75fd7e7b6", + "name": "测试-根据需求生成应用", "internaldependencies": [] } \ No newline at end of file diff --git a/app/task.py b/app/task.py index 717e593..ae27334 100644 --- a/app/task.py +++ b/app/task.py @@ -276,4 +276,4 @@ def process_new_demand(app_id, app_secret, table_id, record_id, data): @shared_task(include_result=False) def process_new_robot(): - new_blank_robot(name="测试-需求创建机器人") + new_blank_robot("测试-根据需求生成应用") diff --git a/app/utils/yd_utils.py b/app/utils/yd_utils.py index 16f22ab..3ad607f 100644 --- a/app/utils/yd_utils.py +++ b/app/utils/yd_utils.py @@ -490,8 +490,12 @@ def new_blank_robot(name="", user_id="80808032853078016"): public = Client(public_username, public_password) # 1. 设置文件上传模板文件路径 - schema_save_path = os.path.join("/code/app/flow_template/robot", "package.json") - package_save_path = os.path.join("/code/app/flow_template/robot", "blank.bot") + schema_save_path = os.path.join( + "/code/app/flow_template/robot", "package.json" + ) + package_save_path = os.path.join( + "/code/app/flow_template/robot", "blank.bot" + ) # 2. 创建新公有云新 UUID new_uuid = str(uuid.uuid4()) @@ -545,7 +549,7 @@ def new_blank_robot(name="", user_id="80808032853078016"): res = public.save_public(SAVE_ROBOT_TEMPLATE) print(res) - time.sleep(2) + time.sleep(5) public.add_developer(new_uuid, user_id) @@ -632,10 +636,10 @@ if __name__ == "__main__": dotenv.load_dotenv() xbot_username = os.environ["XBOT_USERNAME"] xbot_password = os.environ["XBOT_PASSWORD"] - token = get_token(xbot_username, xbot_password) - office_activity_uuids: list = get_activity_info(token) - for item in office_activity_uuids: - print(item.get("packageViewName"), item.get("uuid")) + # token = get_token(xbot_username, xbot_password) + # office_activity_uuids: list = get_activity_info(token) + # for item in office_activity_uuids: + # print(item.get("packageViewName"), item.get("uuid")) - # new_blank_robot() + new_blank_robot("测试-根据需求生成应用") # new_blank_activity()