MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _default_reading_notes_git_dir

Function _default_reading_notes_git_dir

deployments/desktop/shared/agents.py:857–872  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

855 return result
856
857
858_ENV_FILE_CACHE_LOCK = threading.Lock()
859# (mtime_ns, size) -> parsed .env contents. Every _env_text() lookup used to
860# re-read and re-parse .env from disk, and settings-derived paths are consulted
861# per file while scanning reports: 23718 reads of the same file for a single
862# reports refresh, which dominated the runtime. Keyed on mtime+size so an edit
863# through the settings panel is still picked up immediately.
864_ENV_FILE_CACHE: Optional[Tuple[int, int, Dict[str, str]]] = None
865
866
867def _read_env_file() -> Dict[str, str]:
868 global _ENV_FILE_CACHE
869 try:
870 stat = ENV_PATH.stat()
871 signature = (stat.st_mtime_ns, stat.st_size)
872 except OSError:
873 # No .env at all: nothing to cache, and callers fall back to os.environ.
874 with _ENV_FILE_CACHE_LOCK:
875 _ENV_FILE_CACHE = None

Callers 1

Calls 3

_daily_note_rootsFunction · 0.85
nowMethod · 0.80

Tested by

no test coverage detected