You've already forked FrameTour-RenderWorker
feat(重构): 实现新的渲染服务架构
- 新增 RenderTask
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user