fix async oper

This commit is contained in:
jxxghp
2025-07-30 18:48:50 +08:00
parent edec18cacb
commit 48d353aa90
6 changed files with 40 additions and 61 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ from typing import List, Tuple, Optional
from app.core.cache import cached, cache_backend
from app.core.config import settings
from app.db.subscribe_oper import SubscribeOper, AsyncSubscribeOper
from app.db.subscribe_oper import SubscribeOper
from app.db.systemconfig_oper import SystemConfigOper
from app.log import logger
from app.schemas.types import SystemConfigKey
@@ -190,7 +190,7 @@ class SubscribeHelper(metaclass=WeakSingleton):
"""
if not settings.SUBSCRIBE_STATISTIC_SHARE:
return False, "当前没有开启订阅数据共享功能"
subscribe = await AsyncSubscribeOper().get(subscribe_id)
subscribe = await SubscribeOper().async_get(subscribe_id)
if not subscribe:
return False, "订阅不存在"
subscribe_dict = subscribe.to_dict()
+2 -2
View File
@@ -3,7 +3,7 @@ from typing import List, Tuple, Optional
from app.core.cache import cached, cache_backend
from app.core.config import settings
from app.db.workflow_oper import WorkflowOper, AsyncWorkflowOper
from app.db.workflow_oper import WorkflowOper
from app.log import logger
from app.utils.http import RequestUtils, AsyncRequestUtils
from app.utils.singleton import WeakSingleton
@@ -79,7 +79,7 @@ class WorkflowHelper(metaclass=WeakSingleton):
return False, "当前没有开启工作流数据共享功能"
# 获取工作流信息
workflow = await AsyncWorkflowOper().get(workflow_id)
workflow = await WorkflowOper().async_get(workflow_id)
if not workflow:
return False, "工作流不存在"