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:
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) _, _, _, _, response_content, _ = process_func(data)
# ------------- # -------------
if response_content: if response_content:
result_v2(response_content, data) result_v2(response_content, data)
else: else:
scheduler(data) scheduler(data)
# if check_file_in_tos(context_path): else:
# response_content = tos_utils.get_string_from_tos(context_path) _, _, _, _, response_content, _ = process_func(data)
# elif process_func: if response_content:
# _, _, _, _, response_content, _ = process_func(data) commit_task(data, 'SUCCESS')
# # ------------- resp_cache_key = f"geo:task_check:resp:{reqId}"
# if response_content: resp = {
# result_v2(response_content, data) "code": 200,
# else: "msg": "success",
# scheduler(data) "data": {
# if not channel: "status": 'ING',
# if check_file_in_tos(context_path): "result": {}
# response_content = tos_utils.get_string_from_tos(context_path) }
# elif process_func: }
# _, _, _, _, response_content, _ = process_func(data) _cache_set_json(resp_cache_key, resp, 1)
# # ------------- else:
# if response_content: scheduler(data)
# 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