Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
JOSSOUD Olivier
WIM Collect
Commits
36372555
Commit
36372555
authored
Jan 27, 2020
by
JOSSOUD Olivier
Browse files
SFTPDMC. Remove picarro_id from settings.ini
parent
87b70b68
Pipeline
#57585
passed with stages
in 1 minute and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wimcollect/sftpdmc.py
wimcollect/sftpdmc.py
+3
-3
No files found.
wimcollect/sftpdmc.py
View file @
36372555
...
...
@@ -34,7 +34,7 @@ class Collector(utils.LogConfig):
+
"/DMC_"
+
picarro_id
+
"_"
+
day
.
strftime
(
"%Y%m%d"
)
+
".zip"
# Build destination file path
dest_filepath
=
self
.
__get_dest_filepath__
(
day
,
source_filepath
)
dest_filepath
=
self
.
__get_dest_filepath__
(
picarro_id
,
day
,
source_filepath
)
# Download file
self
.
logger
.
info
(
"Downloading DMC Picarro file from SFTP server."
,
day_str
)
...
...
@@ -55,10 +55,10 @@ class Collector(utils.LogConfig):
else
:
self
.
logger
.
info
(
"Done. Archive file: "
+
lzma_filepath
,
day_str
)
def
__get_dest_filepath__
(
self
,
day
:
datetime
.
date
,
source_filepath
:
str
)
->
str
:
def
__get_dest_filepath__
(
self
,
picarro_id
:
str
,
day
:
datetime
.
date
,
source_filepath
:
str
)
->
str
:
# Build destination directory
dest_dir
=
os
.
path
.
join
(
self
.
config
[
"LOCAL"
][
"base_dir"
],
"DMC"
,
"picarro"
,
self
.
config
[
self
.
object_id
][
"
picarro_id
"
]
,
str
(
day
.
year
))
"DMC"
,
"picarro"
,
picarro_id
,
str
(
day
.
year
))
if
not
os
.
path
.
exists
(
dest_dir
):
os
.
makedirs
(
dest_dir
)
...
...
Write
Preview
Markdown
is supported
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