adjust event data
continuous-integration/drone/push Build is passing

This commit is contained in:
jianxin committed 2024-04-10 14:38:04 +08:00
1 parent 240ebff657
commit d3af172a77
3 files changed
+28 -32

No files matched your search

+23
View File
@@ -8,6 +8,7 @@ from celery import Task
from app.utils.utils import *
from app.utils.yd_utils import get_token, get_activity_info
from app.utils.feishu import create_doc, get_doc_block, create_doc_block
@shared_task(include_result=False)
@@ -123,3 +124,25 @@ def sync_xbot_activity_info():
)
print(f"新增的数量: {len(handle_list)}")
print("新增的uuid: ", handle_list)
@shared_task(include_result=False)
def process_new_demand(app_id, app_secret, data):
title = data.get("title")
background = data.get("background")
features = data.get("features")
client = (
lark.Client.builder()
.app_id(app_id)
.app_secret(app_secret)
.log_level(lark.LogLevel.DEBUG)
.build()
)
space_id = "7268552249415319554"
parent_node_token = "ADkFwlLhmiLcqAk3QXLcZnHAnHf"
doc_id = create_doc(client, space_id, parent_node_token, title)
block_id = get_doc_block(client, doc_id)
create_doc_block(client, doc_id, block_id, background, features)