app不使用批量上报

This commit is contained in:
2025-04-28 16:28:27 +08:00
parent 1c0e4ce411
commit b3911839f3
2 changed files with 11 additions and 7 deletions

3
app.py
View File

@ -12,14 +12,13 @@ load_local_template()
import logging
LOGGER = logging.getLogger(__name__)
init_opentelemetry()
init_opentelemetry(batch=False)
app = flask.Flask(__name__)
@app.post('/<task_id>')
def do_task(task_id):
task_info = api.get_task_info(task_id)
biz.task.start_task(task_info)
time.sleep(1) # for telemetry upload traces
return "OK"