Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OSUG
RESIF
resif_data_reporter
Commits
41aae7f4
Commit
41aae7f4
authored
Jan 24, 2019
by
Jonathan Schaeffer
Browse files
Correction de la commande du
parent
4a73fa4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
resif_data_reporter.py
View file @
41aae7f4
...
...
@@ -41,7 +41,7 @@ def scan_volume(path):
logger
.
debug
(
"Volume %s"
%
(
volume
))
# TODO mettre le niveau de profondeur (2) en option
starttime
=
datetime
.
datetime
.
now
()
lines
=
subprocess
.
check_output
([
"du"
,
"--exclude
.snapshot"
,
"-d2"
,
volume
]).
decode
(
"utf-8"
).
splitlines
()
lines
=
subprocess
.
check_output
([
"du"
,
"--exclude
"
,
"
.snapshot"
,
"-d2"
,
volume
]).
decode
(
"utf-8"
).
splitlines
()
logger
.
debug
(
"Volume scanned in %s"
%
(
datetime
.
datetime
.
now
()
-
starttime
))
for
l
in
lines
:
logger
.
debug
(
l
)
...
...
@@ -105,7 +105,8 @@ def main():
logger
.
info
(
"Starting"
)
statistics
=
[]
use_cache
=
False
# TODO : utiliser un cache par volume configuré
# ça permettrait de lancer plusieurs fois l'application dans la même journée
# Refresh or use cache ?
# Try to open data.yaml
cache_file
=
cfg
[
'cache_file'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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