修复dramatiq队列无法触发钩子的问题
This commit is contained in:
parent
f5515ac8f3
commit
bfc3883c5c
@ -8,6 +8,7 @@ import dramatiq
|
|||||||
from dramatiq.brokers.redis import RedisBroker
|
from dramatiq.brokers.redis import RedisBroker
|
||||||
|
|
||||||
from jingrow.ai.pagetype.local_ai_agent.executor import NodeExecutor
|
from jingrow.ai.pagetype.local_ai_agent.executor import NodeExecutor
|
||||||
|
from jingrow.core.hooks.init_hooks import init_hooks
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -304,6 +305,11 @@ def execute_local_scheduled_job(job_json: str) -> None:
|
|||||||
"""Worker 执行入口:job_json 为 JSON 字符串,包含 target_type 及其参数。
|
"""Worker 执行入口:job_json 为 JSON 字符串,包含 target_type 及其参数。
|
||||||
target_type: agent
|
target_type: agent
|
||||||
"""
|
"""
|
||||||
|
try:
|
||||||
|
init_hooks(clear_cache=False)
|
||||||
|
except Exception as e:
|
||||||
|
logger.warning(f"初始化钩子系统失败: {e}")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
payload = json.loads(job_json)
|
payload = json.loads(job_json)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user