Reduce the number of graph_execution_manager.get(...) calls from the InvocationStatsService.

This commit is contained in:
Ryan Dick
2024-01-11 13:03:03 -05:00
committed by Kent Keirsey
parent ac42513da9
commit aa45d21fd2
3 changed files with 51 additions and 37 deletions

View File

@@ -132,7 +132,6 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
source_node_id=source_node_id,
result=outputs.model_dump(),
)
self.__invoker.services.performance_statistics.log_stats()
except KeyboardInterrupt:
pass
@@ -195,6 +194,7 @@ class DefaultInvocationProcessor(InvocationProcessorABC):
error=traceback.format_exc(),
)
elif is_complete:
self.__invoker.services.performance_statistics.log_stats(graph_execution_state.id)
self.__invoker.services.events.emit_graph_execution_complete(
queue_batch_id=queue_item.session_queue_batch_id,
queue_item_id=queue_item.session_queue_item_id,