mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
use same logging pattern in sync_recordings as the other sync functions
This commit is contained in:
parent
f1a19128ed
commit
a8b90834b0
@ -198,10 +198,14 @@ def sync_recordings(
|
|||||||
result.aborted = True
|
result.aborted = True
|
||||||
return result
|
return result
|
||||||
|
|
||||||
if files_to_delete and not dry_run:
|
if dry_run:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Deleting {len(files_to_delete)} recordings files with missing DB entries"
|
f"Recordings sync (dry run): Found {len(files_to_delete)} orphaned files"
|
||||||
)
|
)
|
||||||
|
return result
|
||||||
|
|
||||||
|
# Delete orphans
|
||||||
|
logger.info(f"Deleting {len(files_to_delete)} orphaned recordings files")
|
||||||
for file in files_to_delete:
|
for file in files_to_delete:
|
||||||
try:
|
try:
|
||||||
os.unlink(file)
|
os.unlink(file)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user