mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Handle bad id in log_stats(...).
This commit is contained in:
parent
aa45d21fd2
commit
296c861e7d
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user