fix: correct reconcile log severity, docstring gaps, and _entry allocation (v0.5.9)

- reconcile.py: swap log levels — external-upload path (permanent mapping
  loss) escalated to WARNING; timeout path (transient, retries next cycle)
  downgraded to INFO. Also extend the warning message to note the files are
  permanently unmapped.

- immich_api.py: extend fetch_all_assets docstring to document that
  all-garbage page termination (in addition to network errors) makes
  total_raw a lower bound.

- executor.py: add comment above shutil.rmtree noting that POSIX rmtree
  raises NotADirectoryError on a top-level symlink, documenting why the
  removed islink guard is safe to omit.

- upload_tracker.py: replace setdefault with explicit guard in _entry() —
  setdefault evaluates its default-dict argument before checking key
  presence, allocating and discarding a dict on every already-present call.
This commit is contained in:
2026-06-15 00:51:21 +00:00
parent 1556d90bcc
commit 2d39291fe7
6 changed files with 25 additions and 9 deletions
+2
View File
@@ -107,6 +107,8 @@ def execute_jobs(jobs: list[dict]) -> None:
logger.error(str(e))
continue
# Face crops are transient (uploaded then discarded); wipe before each run.
# shutil.rmtree raises NotADirectoryError on a top-level symlink (POSIX),
# so a race-replaced symlink cannot cause deletion outside output_dir.
if os.path.isdir(person_dir):
shutil.rmtree(person_dir)
os.makedirs(person_dir, exist_ok=True)