From 99a43cb6e1fb63fd6a14ce8d62ef399fa380cf33 Mon Sep 17 00:00:00 2001 From: zy123 <646228430@qq.com> Date: Wed, 25 Sep 2024 09:45:40 +0800 Subject: [PATCH] 9.25 --- flask_app/main/start_up.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/flask_app/main/start_up.py b/flask_app/main/start_up.py index 338e419..a8da2c7 100644 --- a/flask_app/main/start_up.py +++ b/flask_app/main/start_up.py @@ -82,16 +82,16 @@ def zbparse(): logger = g.logger # 获取并显示接收到的 JSON 数据 received_data = request.get_json() - app.logger.info("Received JSON data: " + str(received_data)) - file_url = validate_request() - if isinstance(file_url, tuple): # Check if the returned value is an error response - return file_url - try: - logger.info("starting parsing url:" + file_url) - return Response(stream_with_context(process_and_stream(file_url)), content_type='text/event-stream') - except Exception as e: - logger.error('Exception occurred: ' + str(e)) - return jsonify({'error': str(e)}), 500 + logger.info("Received JSON data: " + str(received_data)) + # file_url = validate_request() + # if isinstance(file_url, tuple): # Check if the returned value is an error response + # return file_url + # try: + # logger.info("starting parsing url:" + file_url) + # return Response(stream_with_context(process_and_stream(file_url)), content_type='text/event-stream') + # except Exception as e: + # logger.error('Exception occurred: ' + str(e)) + # return jsonify({'error': str(e)}), 500 # 分段返回