Added queue tracking
This commit is contained in:
parent
497009da7e
commit
e3d4fdcdae
@ -88,6 +88,9 @@ class SlicedRecorder(Thread):
|
|||||||
except Empty:
|
except Empty:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def get_queue_length(self) -> int:
|
||||||
|
return self._output_queue.qsize()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self._active = False
|
self._active = False
|
||||||
|
|
||||||
@ -104,6 +107,10 @@ class BirbnetesIoTPlatformRecordDriver:
|
|||||||
def get_recording(cls, blocking: bool = False) -> Optional[str]:
|
def get_recording(cls, blocking: bool = False) -> Optional[str]:
|
||||||
return cls.sliced_recorder.get_recording(blocking)
|
return cls.sliced_recorder.get_recording(blocking)
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def get_queue_length(cls) -> int:
|
||||||
|
return cls.sliced_recorder.get_queue_length()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def cleanup(cls):
|
def cleanup(cls):
|
||||||
cls.sliced_recorder.stop()
|
cls.sliced_recorder.stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user