Commit 2c4c0b22 authored by Yaowentong's avatar Yaowentong

修复豆包网页版本数据

parent 8da85c3c
...@@ -1697,48 +1697,32 @@ def platform_process(data): ...@@ -1697,48 +1697,32 @@ def platform_process(data):
# ------------- # -------------
process_func = PLATFORM_PROCESS_MAP.get(platform) process_func = PLATFORM_PROCESS_MAP.get(platform)
if process_func: if not channel:
_, _, _, _, response_content, _ = process_func(data) if check_file_in_tos(context_path):
# ------------- response_content = tos_utils.get_string_from_tos(context_path)
if response_content: elif process_func:
result_v2(response_content, data) _, _, _, _, response_content, _ = process_func(data)
# -------------
if response_content:
result_v2(response_content, data)
else:
scheduler(data)
else: else:
scheduler(data) _, _, _, _, response_content, _ = process_func(data)
# if check_file_in_tos(context_path): if response_content:
# response_content = tos_utils.get_string_from_tos(context_path) commit_task(data, 'SUCCESS')
# elif process_func: resp_cache_key = f"geo:task_check:resp:{reqId}"
# _, _, _, _, response_content, _ = process_func(data) resp = {
# # ------------- "code": 200,
# if response_content: "msg": "success",
# result_v2(response_content, data) "data": {
# else: "status": 'ING',
# scheduler(data) "result": {}
# if not channel: }
# if check_file_in_tos(context_path): }
# response_content = tos_utils.get_string_from_tos(context_path) _cache_set_json(resp_cache_key, resp, 1)
# elif process_func: else:
# _, _, _, _, response_content, _ = process_func(data) scheduler(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)
return True return True
except Exception as e: except Exception as e:
...@@ -2031,8 +2015,8 @@ if __name__ == '__main__': ...@@ -2031,8 +2015,8 @@ if __name__ == '__main__':
type_t = i.get('type') type_t = i.get('type')
# type_t = 'batch' # type_t = 'batch'
# commit_task(i,'ING') # commit_task(i,'ING')
return task_send_queue(i,type_t) # return task_send_queue(i,type_t)
# return platform_process(i) return platform_process(i)
# #
if data_list: if data_list:
with ThreadPoolExecutor(max_workers=50) as executor: 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