fix: address 3 quality review findings — record_frigate_files_batch cache mutation, tracker_ok flag, LIMIT guard

- record_frigate_files_batch: copy-before-mutate so a write failure
  doesn't leave cache ahead of disk (same fix as remove_frigate_files_batch)
- executor: replace tracker_ok boolean with try/else
- jobs: collapse duplicate custom_limit is not None checks into one guard

Bump version to 0.6.3.
This commit is contained in:
2026-06-16 18:13:36 +00:00
parent e8cb390fe4
commit 14f759e960
5 changed files with 19 additions and 9 deletions
+1 -3
View File
@@ -510,7 +510,6 @@ def upload_to_frigate(jobs: list[dict]) -> None:
asset_id = asset_map.get(fname)
if asset_id:
tracker_ok = True
try:
mark_uploaded(
asset_id,
@@ -520,7 +519,6 @@ def upload_to_frigate(jobs: list[dict]) -> None:
frigate_score=pre_fscore,
)
except Exception as tracker_exc:
tracker_ok = False
# Upload to Frigate succeeded — don't retry on tracker
# failure or we'd upload a duplicate to Frigate.
logger.error(
@@ -528,7 +526,7 @@ def upload_to_frigate(jobs: list[dict]) -> None:
" but asset may be re-selected next run: %s",
fname, tracker_exc,
)
if tracker_ok:
else:
if pre_fscore is not None:
person_has_fscores = True
actually_uploaded.append((fname, asset_id))