Commit 1e2bae02 authored by JOSSOUD Olivier's avatar JOSSOUD Olivier
Browse files

FTP CEA. Add special case for AMS site.

parent 6c3f6454
Pipeline #59972 passed with stages
in 3 minutes and 38 seconds
......@@ -35,7 +35,12 @@ class PicarroCollector(utils.LogConfig):
ftp_session = ftp.connect(self.config[self.object_id], self.logger)
# Build source file path
source_filepath = self.get_source_filepath(self.distant_base_dir, site_id, picarro_id, date_str)
if site_id == "AMS":
# The file transfer from AMS' Picarro to FTP-CEA server is managed by AMS' IT team ; the FTP-CEA distant
# folder is not the same...
source_filepath = "/pub/ramces/AMS/PicarroIso/" + site_id + "_" + picarro_id + "_" + date_str + ".lzma"
else:
source_filepath = self.get_source_filepath(self.distant_base_dir, site_id, picarro_id, date_str)
# Build destination file path
dest_filepath = utils.get_standard_filepath(self.local_base_dir, site_id, "picarro", picarro_id, date_str, "lzma")
......
......@@ -8,3 +8,4 @@ class TestPicarroCollector(TestCase):
def test_download(self):
collector = ftpcea.PicarroCollector()
self.assertTrue(collector.download("SRT", "HIDS2108", datetime.date(2020, 1, 20)))
self.assertTrue(collector.download("AMS", "HIDS2194", datetime.date(2020, 2, 10)))
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