feat(重构): 实现新的渲染服务架构

- 新增 RenderTask
This commit is contained in:
2025-09-12 14:41:58 +08:00
parent c36e838d4f
commit d770d84927
22 changed files with 1987 additions and 170 deletions

View File

@@ -24,13 +24,14 @@ def sync_center():
通过接口获取任务
:return: 任务列表
"""
from template import TEMPLATES, download_template
from services import DefaultTemplateService
template_service = DefaultTemplateService()
try:
response = session.post(os.getenv('API_ENDPOINT') + "/sync", json={
'accessKey': os.getenv('ACCESS_KEY'),
'clientStatus': util.system.get_sys_info(),
'templateList': [{'id': t.get('id', ''), 'updateTime': t.get('updateTime', '')} for t in
TEMPLATES.values()]
template_service.templates.values()]
}, timeout=10)
response.raise_for_status()
except requests.RequestException as e:
@@ -56,7 +57,7 @@ def sync_center():
template_id = template.get('id', '')
if template_id:
logger.info("更新模板:【%s", template_id)
download_template(template_id)
template_service.download_template(template_id)
return tasks