2.15 确认非截取泄漏内存

This commit is contained in:
zy123 2025-02-15 11:18:28 +08:00
parent 66382a5242
commit fb6da69488

View File

@ -4,12 +4,14 @@ from flask import Blueprint, Response, stream_with_context, current_app, jsonify
import json import json
import time import time
from flask_app.ConnectionLimiter import require_execution_timeout
from flask_app.routes.utils import validate_and_setup_logger from flask_app.routes.utils import validate_and_setup_logger
test_zbparse_bp = Blueprint('test_zbparse', __name__) test_zbparse_bp = Blueprint('test_zbparse', __name__)
@test_zbparse_bp.route('/api/test_zbparse', methods=['POST']) @test_zbparse_bp.route('/api/test_zbparse', methods=['POST'])
@validate_and_setup_logger @validate_and_setup_logger
@require_execution_timeout(timeout=1800)
def test_zbparse(): def test_zbparse():
try: try:
return Response(stream_with_context(test_process_and_stream()), content_type='text/event-stream') return Response(stream_with_context(test_process_and_stream()), content_type='text/event-stream')