mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-10 21:25:24 +03:00
Formatting
This commit is contained in:
parent
ad85df4c31
commit
cb34ac5026
@ -157,9 +157,9 @@ def config():
|
|||||||
config["plus"] = {"enabled": current_app.plus_api.is_active()}
|
config["plus"] = {"enabled": current_app.plus_api.is_active()}
|
||||||
|
|
||||||
for detector, detector_config in config["detectors"].items():
|
for detector, detector_config in config["detectors"].items():
|
||||||
detector_config["model"][
|
detector_config["model"]["labelmap"] = (
|
||||||
"labelmap"
|
current_app.frigate_config.model.merged_labelmap
|
||||||
] = current_app.frigate_config.model.merged_labelmap
|
)
|
||||||
|
|
||||||
return jsonify(config)
|
return jsonify(config)
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,9 @@ class StatsEmitter(threading.Thread):
|
|||||||
self.stats_history.append(stats)
|
self.stats_history.append(stats)
|
||||||
return stats
|
return stats
|
||||||
|
|
||||||
def get_stats_history(self, keys: Optional[list[str]] = None) -> list[dict[str, any]]:
|
def get_stats_history(
|
||||||
|
self, keys: Optional[list[str]] = None
|
||||||
|
) -> list[dict[str, any]]:
|
||||||
"""Get stats history."""
|
"""Get stats history."""
|
||||||
if not keys:
|
if not keys:
|
||||||
return self.stats_history
|
return self.stats_history
|
||||||
@ -67,7 +69,9 @@ class StatsEmitter(threading.Thread):
|
|||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
for counter in itertools.cycle(range(int(self.config.mqtt.stats_interval / 10))):
|
for counter in itertools.cycle(
|
||||||
|
range(int(self.config.mqtt.stats_interval / 10))
|
||||||
|
):
|
||||||
if self.stop_event.wait(10):
|
if self.stop_event.wait(10):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user