mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
Handle bad id in log_stats(...).
This commit is contained in:
@@ -98,8 +98,12 @@ class InvocationStatsService(InvocationStatsServiceBase):
|
||||
logger.warning(f"Attempted to clear statistics for unknown graph {graph_execution_state_id}: {e}.")
|
||||
|
||||
def log_stats(self, graph_execution_state_id: str):
|
||||
graph_stats = self._stats[graph_execution_state_id]
|
||||
cache_stats = self._cache_stats[graph_execution_state_id]
|
||||
try:
|
||||
graph_stats = self._stats[graph_execution_state_id]
|
||||
cache_stats = self._cache_stats[graph_execution_state_id]
|
||||
except KeyError as e:
|
||||
logger.warning(f"Attempted to log statistics for unknown graph {graph_execution_state_id}: {e}.")
|
||||
return
|
||||
|
||||
log = graph_stats.get_pretty_log(graph_execution_state_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user