You've already forked FrameTour-RenderWorker
下载模板时trace归组
This commit is contained in:
@ -2,6 +2,7 @@ import json
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from telemetry import get_tracer
|
||||||
from util import api, oss
|
from util import api, oss
|
||||||
|
|
||||||
TEMPLATES = {}
|
TEMPLATES = {}
|
||||||
@ -75,6 +76,8 @@ def get_template_def(template_id):
|
|||||||
return TEMPLATES.get(template_id)
|
return TEMPLATES.get(template_id)
|
||||||
|
|
||||||
def download_template(template_id):
|
def download_template(template_id):
|
||||||
|
tracer = get_tracer(__name__)
|
||||||
|
with tracer.start_as_current_span("download_template"):
|
||||||
template_info = api.get_template_info(template_id)
|
template_info = api.get_template_info(template_id)
|
||||||
if not os.path.isdir(template_info['local_path']):
|
if not os.path.isdir(template_info['local_path']):
|
||||||
os.makedirs(template_info['local_path'])
|
os.makedirs(template_info['local_path'])
|
||||||
|
Reference in New Issue
Block a user