Skip to content

Commit 0bf9979

Browse files
committed
fix(cache): add comment to FileNotFoundError except block
Signed-off-by: Pavan-Rana <psrbr157@gmail.com>
1 parent 1c5e4ca commit 0bf9979

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sqlmesh/utils/cache.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def __init__(self, path: Path, prefix: t.Optional[str] = None):
6868
if not file.stem.startswith(self._cache_version) or stat_result.st_atime < threshold:
6969
file.unlink(missing_ok=True)
7070
except FileNotFoundError:
71+
# File was deleted between glob() and stat() — skip stale cache entries gracefully
7172
continue
7273

7374
def get_or_load(self, name: str, entry_id: str = "", *, loader: t.Callable[[], T]) -> T:

0 commit comments

Comments
 (0)