mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 07:27:15 +08:00
refactor: unify agent data port access
This commit is contained in:
@@ -8,7 +8,7 @@ from app.agent.tools.tags import ToolTag
|
||||
from app.runtime.settings import RuntimeSettingsCompat
|
||||
|
||||
settings = RuntimeSettingsCompat()
|
||||
from app.application.agentdata import AgentTaskPort as AgentTaskOper
|
||||
from app.application.agentdata import get_agent_task_port
|
||||
|
||||
|
||||
class QueryAgentTasksInput(BaseModel):
|
||||
@@ -52,7 +52,7 @@ class QueryAgentTasksTool(MoviePilotTool):
|
||||
"""读取当前用户的任务及运行时下一次触发时间。"""
|
||||
from app.application.scheduling import get_agent_task_next_run
|
||||
|
||||
oper = AgentTaskOper()
|
||||
oper = get_agent_task_port()
|
||||
if task_id:
|
||||
task = oper.get(task_id=task_id, user_id=str(self._user_id))
|
||||
tasks = [task] if task else []
|
||||
|
||||
Reference in New Issue
Block a user