Commit 4a3d0d36 authored by Sascha Herzinger's avatar Sascha Herzinger

Cleanup checks if cache dir exists to avoid exception

parent 79d3eb62
......@@ -9,6 +9,8 @@ def janitor():
file system while Fractalis is running.
"""
data_dir = os.path.join(app.config['FRACTALIS_TMP_DIR'], 'data')
if not os.path.exists(data_dir):
return
cached_files = [f for f in os.listdir(data_dir)
if os.path.isfile(os.path.join(data_dir, f))]
tracked_files = [key.split(':')[1] for key in redis.scan_iter('data:*')]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment