Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(backend): Mark starting nodes as QUEUED instead of INCOMPLETE during the initial execution (#9665)

Zamil Majdy5411e18bd049
diff --git a/autogpt_platform/backend/backend/data/execution.py b/autogpt_platform/backend/backend/data/execution.py
index 397187d5f5..2ced77d4c9 100644
--- a/autogpt_platform/backend/backend/data/execution.py
+++ b/autogpt_platform/backend/backend/data/execution.py
@@ -166,7 +166,8 @@ async def create_graph_execution(
"create": [ # type: ignore
{
"agentNodeId": node_id,
- "executionStatus": ExecutionStatus.INCOMPLETE,
+ "executionStatus": ExecutionStatus.QUEUED,
+ "queuedTime": datetime.now(tz=timezone.utc),
"Input": {
"create": [
{"name": name, "data": Json(data)}
diff --git a/autogpt_platform/backend/backend/executor/manager.py b/autogpt_platform/backend/backend/executor/manager.py
index 039c09b2ee..cbe9b986fa 100644
--- a/autogpt_platform/backend/backend/executor/manager.py
+++ b/autogpt_platform/backend/backend/executor/manager.py
@@ -679,10 +679,6 @@ class Executor:
try:
queue = ExecutionQueue[NodeExecutionEntry]()
for node_exec in graph_exec.start_node_execs:
- exec_update = cls.db_client.update_execution_status(
- node_exec.node_exec_id, ExecutionStatus.QUEUED, node_exec.data
- )
- cls.db_client.send_execution_update(exec_update)
queue.add(node_exec)
running_executions: dict[str, AsyncResult] = {}