fix: keboola client metadata_cache_path uses DATA_DIR instead of deleted config
Fixes #7 — NameError: name 'config' is not defined
This commit is contained in:
parent
04c5aecc58
commit
865d6d657e
1 changed files with 3 additions and 1 deletions
|
|
@ -109,7 +109,9 @@ class KeboolaClient:
|
|||
|
||||
# Metadata cache
|
||||
self.metadata_cache: Dict[str, Dict[str, Any]] = {}
|
||||
self.metadata_cache_path = config.get_metadata_path() / "table_metadata.json"
|
||||
metadata_dir = Path(os.environ.get("DATA_DIR", "./data")) / "metadata"
|
||||
metadata_dir.mkdir(parents=True, exist_ok=True)
|
||||
self.metadata_cache_path = metadata_dir / "table_metadata.json"
|
||||
|
||||
# Load cache from disk if exists
|
||||
self._load_metadata_cache()
|
||||
|
|
|
|||
Loading…
Reference in a new issue