mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-17 04:14:29 +00:00
Shared resource use
This commit is contained in:
1 parent
38bfb19739
commit
7530e54aec
34 files changed
+1322
-101
No files matched your search
@@ -45,6 +45,7 @@ class WorkflowAgent(BaseAgent):
|
||||
):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.workflow_id = workflow_id
|
||||
self.workflow_row: Optional[Dict[str, Any]] = None
|
||||
self.workflow_owner = workflow_owner
|
||||
self._workflow_data = workflow
|
||||
self._engine: Optional[WorkflowEngine] = None
|
||||
@@ -195,6 +196,9 @@ class WorkflowAgent(BaseAgent):
|
||||
if workflow_row is None:
|
||||
logger.error(f"Workflow {self.workflow_id} not found or inaccessible for user {owner_id}")
|
||||
return None
|
||||
# Node tools/sources the owner can't use resolve through its
|
||||
# ``resource_sponsors`` (see WorkflowEngine).
|
||||
self.workflow_row = workflow_row
|
||||
pg_workflow_id = str(workflow_row["id"])
|
||||
graph_version = workflow_row.get("current_graph_version", 1)
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user