优化
This commit is contained in:
+3
-4
@@ -7,9 +7,8 @@ logger = get_logger(__name__)
|
||||
|
||||
|
||||
@app.task(bind=True, max_retries=1, default_retry_delay=60)
|
||||
def process_stp_task(self, task_id: str, file_path: str, stp_file_id: int,
|
||||
process_params: dict):
|
||||
"""Celery 任务:异步处理 STP 文件生成模具型腔"""
|
||||
def process_stp_task(self, task_id: str, stp_file_id: int, process_params: dict):
|
||||
"""Celery 任务:异步处理 STP 文件生成模具型腔(源文件按 stp_file_id 从 RustFS 获取)"""
|
||||
import asyncio
|
||||
|
||||
async def _run():
|
||||
@@ -34,7 +33,7 @@ def process_stp_task(self, task_id: str, file_path: str, stp_file_id: int,
|
||||
await db_manager.connect(role="celery")
|
||||
|
||||
await processing_service.process_file_with_storage(
|
||||
task_id, file_path, stp_file_id, process_params
|
||||
task_id, stp_file_id, process_params
|
||||
)
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user