Refactor: Logging Cleanup

This commit is contained in:
ziesorx 2025-09-24 20:39:32 +07:00
parent 7a9a149955
commit 5176f99ba7
9 changed files with 37 additions and 72 deletions

View file

@ -10,7 +10,7 @@ from dataclasses import dataclass
from collections import defaultdict
from .readers import RTSPReader, HTTPSnapshotReader
from .buffers import shared_cache_buffer, save_frame_for_testing, StreamType
from .buffers import shared_cache_buffer, StreamType
from ..tracking.integration import TrackingPipelineIntegration
@ -25,7 +25,6 @@ class StreamConfig:
snapshot_url: Optional[str] = None
snapshot_interval: int = 5000 # milliseconds
max_retries: int = 3
save_test_frames: bool = False
@dataclass
@ -184,13 +183,6 @@ class StreamManager:
# Store frame in shared buffer with stream type
shared_cache_buffer.put_frame(camera_id, frame, stream_type)
# Save test frames if enabled for any subscription
with self._lock:
for subscription_id in self._camera_subscribers[camera_id]:
subscription_info = self._subscriptions[subscription_id]
if subscription_info.stream_config.save_test_frames:
save_frame_for_testing(camera_id, frame)
break # Only save once per frame
# Process tracking for subscriptions with tracking integration
self._process_tracking_for_camera(camera_id, frame)
@ -349,7 +341,6 @@ class StreamManager:
snapshot_url=payload.get('snapshotUrl'),
snapshot_interval=payload.get('snapshotInterval', 5000),
max_retries=3,
save_test_frames=True # Enable for testing
)
return self.add_subscription(