diff --git a/birbnetes_iot_platform_raspberry/record_stuff.py b/birbnetes_iot_platform_raspberry/record_stuff.py index 58aa5ef..496596b 100644 --- a/birbnetes_iot_platform_raspberry/record_stuff.py +++ b/birbnetes_iot_platform_raspberry/record_stuff.py @@ -88,6 +88,9 @@ class SlicedRecorder(Thread): except Empty: return None + def get_queue_length(self) -> int: + return self._output_queue.qsize() + def stop(self): self._active = False @@ -104,6 +107,10 @@ class BirbnetesIoTPlatformRecordDriver: def get_recording(cls, blocking: bool = False) -> Optional[str]: return cls.sliced_recorder.get_recording(blocking) + @classmethod + def get_queue_length(cls) -> int: + return cls.sliced_recorder.get_queue_length() + @classmethod def cleanup(cls): cls.sliced_recorder.stop()