mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Start adding storage maintainer
This commit is contained in:
parent
476d011c55
commit
3186046d45
@ -283,13 +283,9 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
logger.debug(
|
logger.debug(
|
||||||
f"Copied {file_path} in {datetime.datetime.now().timestamp()-start_frame} seconds."
|
f"Copied {file_path} in {datetime.datetime.now().timestamp()-start_frame} seconds."
|
||||||
)
|
)
|
||||||
try:
|
|
||||||
segment_size = float(os.stat(file_path)) / 1000
|
|
||||||
except OSError:
|
|
||||||
segment_size = -1
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
segment_size = float(os.path.getsize(file_path)) / 1000
|
segment_size = float(os.path.getsize(file_path)) / 1000000
|
||||||
except OSError:
|
except OSError:
|
||||||
segment_size = -1
|
segment_size = -1
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,6 @@
|
|||||||
|
"""Handle storage retention and usage."""
|
||||||
|
|
||||||
|
import threading
|
||||||
|
|
||||||
|
class StorageMaintainer(threading.Thread):
|
||||||
|
"""Maintain frigates recording storage."""
|
||||||
Loading…
Reference in New Issue
Block a user