Fix frigate startup stats (#10887)

This commit is contained in:
Nicolas Mowen 2024-04-08 17:19:00 -06:00 committed by GitHub
parent 55018372d4
commit c577361923
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -18,6 +18,12 @@ export default function useStats(stats: FrigateStats | undefined) {
return problems; return problems;
} }
// if frigate has just started
// don't look for issues
if (stats.service.uptime < 120) {
return problems;
}
// check detectors for high inference speeds // check detectors for high inference speeds
Object.entries(stats["detectors"]).forEach(([key, det]) => { Object.entries(stats["detectors"]).forEach(([key, det]) => {
if (det["inference_speed"] > InferenceThreshold.error) { if (det["inference_speed"] > InferenceThreshold.error) {

View File

@ -47,7 +47,7 @@ export type ServiceStats = {
last_updated: number; last_updated: number;
storage: { [path: string]: StorageStats }; storage: { [path: string]: StorageStats };
temperatures: { [apex: string]: number }; temperatures: { [apex: string]: number };
update: number; uptime: number;
latest_version: string; latest_version: string;
version: string; version: string;
}; };