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.
fix(backend): Fix doubly reported produced output (#9412)
Zamil Majdycdd2d5696cea
diff --git a/autogpt_platform/backend/backend/executor/manager.py b/autogpt_platform/backend/backend/executor/manager.pyindex ae0166e032..d6f4f7d4b3 100644--- a/autogpt_platform/backend/backend/executor/manager.py+++ b/autogpt_platform/backend/backend/executor/manager.py@@ -210,16 +210,16 @@ def execute_node():yield execution- # Update execution status and spend credits- res = update_execution(ExecutionStatus.COMPLETED)- s = input_size + output_size- t = (- (res.end_time - res.start_time).total_seconds()- if res.end_time and res.start_time- else 0- )- data.data = input_data- db_client.spend_credits(data, s, t)+ # Update execution status and spend credits+ res = update_execution(ExecutionStatus.COMPLETED)+ s = input_size + output_size+ t = (+ (res.end_time - res.start_time).total_seconds()+ if res.end_time and res.start_time+ else 0+ )+ data.data = input_data+ db_client.spend_credits(data, s, t)except Exception as e:error_msg = str(e)