Compare commits

...

1 Commits

Author SHA1 Message Date
Zamil Majdy
59d2c5ce35 fix(backend): Fix doubly reported produced output 2025-02-04 21:33:37 +07:00

View File

@@ -210,16 +210,16 @@ def execute_node(
): ):
yield execution yield execution
# Update execution status and spend credits # Update execution status and spend credits
res = update_execution(ExecutionStatus.COMPLETED) res = update_execution(ExecutionStatus.COMPLETED)
s = input_size + output_size s = input_size + output_size
t = ( t = (
(res.end_time - res.start_time).total_seconds() (res.end_time - res.start_time).total_seconds()
if res.end_time and res.start_time if res.end_time and res.start_time
else 0 else 0
) )
data.data = input_data data.data = input_data
db_client.spend_credits(data, s, t) db_client.spend_credits(data, s, t)
except Exception as e: except Exception as e:
error_msg = str(e) error_msg = str(e)