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}.")
|
logger.warning(f"Attempted to clear statistics for unknown graph {graph_execution_state_id}: {e}.")
|
||||||
|
|
||||||
def log_stats(self, graph_execution_state_id: str):
|
def log_stats(self, graph_execution_state_id: str):
|
||||||
|
try:
|
||||||
graph_stats = self._stats[graph_execution_state_id]
|
graph_stats = self._stats[graph_execution_state_id]
|
||||||
cache_stats = self._cache_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)
|
log = graph_stats.get_pretty_log(graph_execution_state_id)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user