xxx
This commit is contained in:
@@ -19,6 +19,7 @@ def process_stp_task(self, task_id: str, file_path: str, stp_file_id: int,
|
||||
# - RustFS(Minio) 为同步客户端,不绑定循环,连一次后跨任务复用。
|
||||
from shared.services.redis_task_manager import redis_task_manager
|
||||
from moldinsight.storage.rustfs_storage import rustfs_manager
|
||||
from shared.database.database import db_manager
|
||||
|
||||
await redis_task_manager.reconnect()
|
||||
if not rustfs_manager.is_connected:
|
||||
@@ -28,6 +29,9 @@ def process_stp_task(self, task_id: str, file_path: str, stp_file_id: int,
|
||||
secret_key=settings.RUSTFS_SECRET_KEY,
|
||||
timeout=settings.RUSTFS_TIMEOUT,
|
||||
)
|
||||
# Celery worker 使用独立连接池配置(较小池)
|
||||
if not db_manager.is_connected:
|
||||
await db_manager.connect(role="celery")
|
||||
|
||||
await processing_service.process_file_with_storage(
|
||||
task_id, file_path, stp_file_id, process_params
|
||||
|
||||
Reference in New Issue
Block a user