Commit 09bc0086 authored by Yaowentong's avatar Yaowentong

修复三方请求

parent f7313d3f
...@@ -102,15 +102,26 @@ def task_check(): ...@@ -102,15 +102,26 @@ def task_check():
try: try:
result_path = f'geo/{task_info["taskId"]}/{task_info["platform"]}/result.json' result_path = f'geo/{task_info["taskId"]}/{task_info["platform"]}/result.json'
result_content = tos_utils.get_string_from_tos(result_path) result_content = tos_utils.get_string_from_tos(result_path)
result_data = json.loads(result_content) channel = task_info.get('channel','')
return jsonify({ if channel :
"code": 200, return jsonify({
"msg": "success", "code": 200,
"data": { "msg": "success",
"status": 'success', "data": {
"result": result_data "status": 'success',
} "result": []
}) }
})
else:
result_data = json.loads(result_content)
return jsonify({
"code": 200,
"msg": "success",
"data": {
"status": 'success',
"result": result_data
}
})
except Exception as e: except Exception as e:
return jsonify({ return jsonify({
"code": 500, "code": 500,
......
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