mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-19 07:18:27 +01:00
cloud: use temp dir instead of individual files
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+3
-4
@@ -216,11 +216,10 @@ class DataCloudBase(object):
|
||||
fname = os.path.join(path, os.path.relpath(k.name, self.cache_file_key(path)))
|
||||
res.append(self._status(k, fname))
|
||||
|
||||
tmp = tempfile.NamedTemporaryFile()
|
||||
self._pull_key(k, tmp.name)
|
||||
with open(tmp.name, 'r') as fd:
|
||||
tmp = os.path.join(tempfile.mkdtemp(), k.name)
|
||||
self._pull_key(k, tmp)
|
||||
with open(tmp, 'r') as fd:
|
||||
d = yaml.safe_load(fd)
|
||||
tmp.close()
|
||||
md5 = d[Output.PARAM_MD5]
|
||||
|
||||
cache = os.path.join(self._cloud_settings.cache_dir, md5)
|
||||
|
||||
Reference in New Issue
Block a user