refactor: extract should_include_path to utils module to resolve circular import between indexer and attachment_indexer

This commit is contained in:
2026-03-26 09:10:09 -04:00
parent 9e42fb072b
commit fe3ffe5860
3 changed files with 40 additions and 36 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ from pathlib import Path
from typing import Dict, List, Optional, Set
import threading
from backend.indexer import _should_include_path
from backend.utils import should_include_path
logger = logging.getLogger("obsigate.attachment_indexer")
@@ -67,7 +67,7 @@ def _scan_vault_attachments(vault_name: str, vault_path: str, vault_cfg: dict =
for fpath in vault_root.rglob("*"):
# Check if path should be included based on hidden files configuration
rel_parts = fpath.relative_to(vault_root).parts
if not _should_include_path(rel_parts, vault_cfg):
if not should_include_path(rel_parts, vault_cfg):
continue
# Only process files