From 4e58e5b3aa96d49bb4749e2f5df5540866bf5a66 Mon Sep 17 00:00:00 2001 From: woni <320753691@qq.com> Date: Tue, 28 May 2024 18:05:26 +0800 Subject: [PATCH] fix print --- app/task.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/task.py b/app/task.py index f8946d8..f5f362a 100644 --- a/app/task.py +++ b/app/task.py @@ -54,6 +54,7 @@ def parse_history_message(data): return message_content_data, message_images_data + @shared_task(include_result=False) def process_message_callback( app_id, app_secret, bitable_token, table_id, cache_dir, data @@ -118,7 +119,7 @@ def process_message_callback( record["创建人"] = [{"id": sender_id}] - history_message_data = get_messages(client, "thread", thread_id, cache_dir) + history_message_data = get_messages(client, "thread", thread_id) lark.logger.info(f"history_message_data: {history_message_data}") message_content_data, message_images_data = parse_history_message( @@ -129,7 +130,7 @@ def process_message_callback( for image in message_images_data: image_path = get_message_resource(client, message_id, image, "image", cache_dir) - print("下载文件成功:", image, image_path) + print(f"下载文件成功: {image}, {image_path}") file_token = upload_media(client, image_path, "bitable_image", bitable_token) print("上传文件成功:", file_token) images_token.append(file_token) @@ -177,7 +178,6 @@ def sync_xbot_activity_info(): office_activity_uuids = get_activity_info(token) print(f"office_activity_uuids count: {len(office_activity_uuids)}") - for item in office_activity_uuids: robot_uuid = item.get("robotUuid") package_view_name = item.get("packageViewName")