Skip to content

Commit

Permalink
Opimization for the load\bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
palikar committed Jun 16, 2020
1 parent 30720fd commit 2539fd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions code_manager/core/cache_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def load_cache(self):
try:
self.cache = json.load(open(self.cache_file))
self.preupdate_cache()
self.loaded = True
except json.decoder.JSONDecodeError:
logging.debug('Invalid or empty cache. Starting with clean cache')
self.cache = dict()
Expand Down
1 change: 1 addition & 0 deletions code_manager/core/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def _do_fetch(self, pack, root=None, node=None):

with self.cache as cache:
if cache.is_fetched(pack) and not self.force:
logging.info("\'%s\' is already fetched", pack)
return 0

if os.path.exists(root_dir) and self.force:
Expand Down

0 comments on commit 2539fd5

Please sign in to comment.