mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-01 03:10:33 +03:00
guard relativemove failures (#24835)
CI / AMD64 Build (push) Waiting to run
CI / AMD64 Smoke Test (push) Blocked by required conditions
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
CI / AMD64 Build (push) Waiting to run
CI / AMD64 Smoke Test (push) Blocked by required conditions
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
This commit is contained in:
@@ -625,7 +625,12 @@ class OnvifController:
|
||||
|
||||
move_request.Speed = move_speed
|
||||
|
||||
await cam["ptz"].RelativeMove(move_request)
|
||||
try:
|
||||
await cam["ptz"].RelativeMove(move_request)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"Onvif sending relative move request to {camera_name} failed: {e}"
|
||||
)
|
||||
|
||||
# reset after the move request
|
||||
move_request.Translation.PanTilt.x = 0
|
||||
|
||||
@@ -195,6 +195,15 @@ class TestManualRelativeMoveMetrics(unittest.IsolatedAsyncioTestCase):
|
||||
)
|
||||
)
|
||||
|
||||
async def test_failed_move_does_not_raise(self) -> None:
|
||||
# an exception here ends the autotracker's move queue consumer for good
|
||||
controller = _make_move_controller(autotracking_enabled=True)
|
||||
controller.cams[CAMERA]["ptz"].RelativeMove.side_effect = TimeoutError
|
||||
|
||||
await controller._move_relative(CAMERA, 0.25, -0.25, 0, 1)
|
||||
|
||||
self.assertFalse(controller.cams[CAMERA]["active"])
|
||||
|
||||
async def test_metrics_written_when_autotracking_enabled(self) -> None:
|
||||
# get_camera_status resets stop_time once the camera reports IDLE, so the
|
||||
# autotracking path keeps its motion estimation timestamps
|
||||
|
||||
Reference in New Issue
Block a user