Commit 2c4c0b22 authored by Yaowentong's avatar Yaowentong

修复豆包网页版本数据

parent 8da85c3c
......@@ -1697,48 +1697,32 @@ def platform_process(data):
# -------------
process_func = PLATFORM_PROCESS_MAP.get(platform)
if process_func:
if not channel:
if check_file_in_tos(context_path):
response_content = tos_utils.get_string_from_tos(context_path)
elif process_func:
_, _, _, _, response_content, _ = process_func(data)
# -------------
if response_content:
result_v2(response_content, data)
else:
scheduler(data)
# if check_file_in_tos(context_path):
# response_content = tos_utils.get_string_from_tos(context_path)
# elif process_func:
# _, _, _, _, response_content, _ = process_func(data)
# # -------------
# if response_content:
# result_v2(response_content, data)
# else:
# scheduler(data)
# if not channel:
# if check_file_in_tos(context_path):
# response_content = tos_utils.get_string_from_tos(context_path)
# elif process_func:
# _, _, _, _, response_content, _ = process_func(data)
# # -------------
# if response_content:
# result_v2(response_content, data)
# else:
# scheduler(data)
# else:
# _, _, _, _, response_content, _ = process_func(data)
# if response_content:
# commit_task(data, 'SUCCESS')
# resp_cache_key = f"geo:task_check:resp:{reqId}"
# resp = {
# "code": 200,
# "msg": "success",
# "data": {
# "status": 'ING',
# "result": {}
# }
# }
# _cache_set_json(resp_cache_key, resp, 1)
# else:
# scheduler(data)
else:
_, _, _, _, response_content, _ = process_func(data)
if response_content:
commit_task(data, 'SUCCESS')
resp_cache_key = f"geo:task_check:resp:{reqId}"
resp = {
"code": 200,
"msg": "success",
"data": {
"status": 'ING',
"result": {}
}
}
_cache_set_json(resp_cache_key, resp, 1)
else:
scheduler(data)
return True
except Exception as e:
......@@ -2031,8 +2015,8 @@ if __name__ == '__main__':
type_t = i.get('type')
# type_t = 'batch'
# commit_task(i,'ING')
return task_send_queue(i,type_t)
# return platform_process(i)
# return task_send_queue(i,type_t)
return platform_process(i)
#
if data_list:
with ThreadPoolExecutor(max_workers=50) as executor:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment