Skip to content

Commit

Permalink
Add LEGACY to old depedendency cache file name
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Feb 14, 2024
1 parent e528f60 commit f195e4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions audb/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def cached(
if (
define.DEPENDENCIES_FILE not in files
and define.LEGACY_DEPENDENCIES_FILE not in files
and define.CACHED_DEPENDENCIES_FILE not in files
and define.LEGACY_CACHED_DEPENDENCIES_FILE not in files
):
# Skip all cache entries
# that don't contain a dependency file
Expand Down Expand Up @@ -265,7 +265,7 @@ def dependencies(
file_found = False
for deps_file in [
define.DEPENDENCIES_FILE,
define.CACHED_DEPENDENCIES_FILE,
define.LEGACY_CACHED_DEPENDENCIES_FILE,
]:
deps_path = os.path.join(db_root, deps_file)
if os.path.exists(deps_path):
Expand Down
2 changes: 1 addition & 1 deletion audb/core/define.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Dependencies
DEPENDENCIES_FILE = f"{DB}.parquet"
LEGACY_DEPENDENCIES_FILE = f"{DB}.csv"
CACHED_DEPENDENCIES_FILE = f"{DB}.pkl"
LEGACY_CACHED_DEPENDENCIES_FILE = f"{DB}.pkl"

# Cache lock
CACHED_VERSIONS_TIMEOUT = 10 # Timeout to acquire access to cached versions
Expand Down

0 comments on commit f195e4e

Please sign in to comment.