2.15 测试是否为@require_execution_timeout

This commit is contained in:
zy123 2025-02-15 11:25:05 +08:00
parent fb6da69488
commit f3aa8ac4bd

View File

@ -14,11 +14,11 @@ test_zbparse_bp = Blueprint('test_zbparse', __name__)
@require_execution_timeout(timeout=1800)
def test_zbparse():
try:
return Response(stream_with_context(test_process_and_stream()), content_type='text/event-stream')
return test_process_and_stream()
except Exception as e:
# 使用 Flask 应用的日志记录器
current_app.logger.error('Exception occurred: ' + str(e))
return jsonify({'error': str(e)}), 500
return jsonify({'error': str(e)})
def test_process_and_stream():
data_segments = [