Private GIT

Skip to content
Snippets Groups Projects
Commit 63246256 authored by Ruud's avatar Ruud
Browse files

Don't remove stuff from python cache

parent 1ac0dc3b
Branches
Tags
No related merge requests found
...@@ -66,10 +66,12 @@ class FileManager(Plugin): ...@@ -66,10 +66,12 @@ class FileManager(Plugin):
time.sleep(3) time.sleep(3)
log.debug('Cleaning up unused files') log.debug('Cleaning up unused files')
python_cache = Env.get('cache')._path
try: try:
db = get_session() db = get_session()
for root, dirs, walk_files in os.walk(Env.get('cache_dir')): for root, dirs, walk_files in os.walk(Env.get('cache_dir')):
for filename in walk_files: for filename in walk_files:
if root == python_cache: continue
file_path = os.path.join(root, filename) file_path = os.path.join(root, filename)
f = db.query(File).filter(File.path == toUnicode(file_path)).first() f = db.query(File).filter(File.path == toUnicode(file_path)).first()
if not f: if not f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment