mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-07 05:55:27 +03:00
mypy
This commit is contained in:
parent
ed9b098469
commit
14da821956
@ -137,7 +137,7 @@ def get_debug_replay_status(request: Request):
|
|||||||
if frame is not None:
|
if frame is not None:
|
||||||
frame_time = frame_processor.get_current_frame_time(replay_camera)
|
frame_time = frame_processor.get_current_frame_time(replay_camera)
|
||||||
camera_config = request.app.frigate_config.cameras.get(replay_camera)
|
camera_config = request.app.frigate_config.cameras.get(replay_camera)
|
||||||
retry_interval = 10
|
retry_interval = 10.0
|
||||||
|
|
||||||
if camera_config is not None:
|
if camera_config is not None:
|
||||||
retry_interval = float(camera_config.ffmpeg.retry_interval or 10)
|
retry_interval = float(camera_config.ffmpeg.retry_interval or 10)
|
||||||
|
|||||||
@ -15,6 +15,8 @@ import time
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import TYPE_CHECKING, Any, Optional
|
from typing import TYPE_CHECKING, Any, Optional
|
||||||
|
|
||||||
|
from peewee import ModelSelect
|
||||||
|
|
||||||
from frigate.config import FrigateConfig
|
from frigate.config import FrigateConfig
|
||||||
from frigate.config.camera.updater import CameraConfigUpdatePublisher
|
from frigate.config.camera.updater import CameraConfigUpdatePublisher
|
||||||
from frigate.const import REPLAY_CAMERA_PREFIX, REPLAY_DIR
|
from frigate.const import REPLAY_CAMERA_PREFIX, REPLAY_DIR
|
||||||
@ -90,7 +92,9 @@ class DebugReplayJob(Job):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def query_recordings(source_camera: str, start_ts: float, end_ts: float):
|
def query_recordings(
|
||||||
|
source_camera: str, start_ts: float, end_ts: float
|
||||||
|
) -> ModelSelect:
|
||||||
"""Return the Recordings query for the time range.
|
"""Return the Recordings query for the time range.
|
||||||
|
|
||||||
Module-level so tests can patch it without instantiating a runner.
|
Module-level so tests can patch it without instantiating a runner.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user