Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Fractalis
fractalis
Commits
4a3d0d36
Commit
4a3d0d36
authored
Jun 05, 2018
by
Sascha Herzinger
Browse files
Cleanup checks if cache dir exists to avoid exception
parent
79d3eb62
Changes
1
Hide whitespace changes
Inline
Side-by-side
fractalis/cleanup.py
View file @
4a3d0d36
...
...
@@ -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:*'
)]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment