mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Improve Storage Logs (#7338)
* Make storage maintenance messages more clear * Log when storage maintenance is happening * Formatting
This commit is contained in:
parent
c2e2656407
commit
98576418a8
@ -153,7 +153,7 @@ class StorageMaintainer(threading.Thread):
|
|||||||
# check if need to delete retained segments
|
# check if need to delete retained segments
|
||||||
if deleted_segments_size < hourly_bandwidth:
|
if deleted_segments_size < hourly_bandwidth:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"Could not clear {hourly_bandwidth} currently {deleted_segments_size}, retained recordings must be deleted."
|
f"Could not clear {hourly_bandwidth} MB, currently {deleted_segments_size} MB have been cleared. Retained recordings must be deleted."
|
||||||
)
|
)
|
||||||
recordings = Recordings.select().order_by(Recordings.start_time.asc())
|
recordings = Recordings.select().order_by(Recordings.start_time.asc())
|
||||||
|
|
||||||
@ -185,6 +185,9 @@ class StorageMaintainer(threading.Thread):
|
|||||||
logger.debug(f"Default camera bandwidths: {self.camera_storage_stats}.")
|
logger.debug(f"Default camera bandwidths: {self.camera_storage_stats}.")
|
||||||
|
|
||||||
if self.check_storage_needs_cleanup():
|
if self.check_storage_needs_cleanup():
|
||||||
|
logger.info(
|
||||||
|
"Less than 1 hour of recording space left, running storage maintenance..."
|
||||||
|
)
|
||||||
self.reduce_storage_consumption()
|
self.reduce_storage_consumption()
|
||||||
|
|
||||||
logger.info("Exiting storage maintainer...")
|
logger.info("Exiting storage maintainer...")
|
||||||
|
Loading…
Reference in New Issue
Block a user