Skip to content
Snippets Groups Projects
Commit 0b1fc9ea authored by TGermain's avatar TGermain
Browse files
parents a3fbd57a 7a20f4c2
No related branches found
No related tags found
No related merge requests found
......@@ -30,5 +30,7 @@ tries = 1
sleep = 0
nb_proc = 8
copy_l2a_sideproducts = False
clean_before = True
clean_after = True
tile;date_min;date_max;max_clouds;l1c;l2a;cloudmask;indices;remove;comments
......@@ -136,6 +136,8 @@ class Job:
"\ndownload tries: {} x / sleep: {} min"
"\nnb_proc: {}"
"\ncopy_l2a_sideproducts: {}"
"\nclean_before : {}"
"\nclean_after : {}"
"\n\ntasks:\n{}".format(
self.logs,
self.timing,
......@@ -145,6 +147,8 @@ class Job:
self.sleep,
self.nb_proc,
self.copy_l2a_sideproducts,
self.clean_before,
self.clean_after,
self.tasks,
)
)
......@@ -267,6 +271,8 @@ class Job:
"sleep = " + str(self.sleep),
"nb_proc = " + str(self.nb_proc),
"copy_l2a_sideproducts = " + str(self.copy_l2a_sideproducts),
"clean_before = " + str(self.clean_before),
"clean_after = " + str(self.clean_after),
"",
"",
]
......@@ -401,6 +407,20 @@ class Job:
)
except:
self.copy_l2a_sideproducts = False
try:
self.clean_before = bool(setuptools.distutils.util.strtobool(
parser["top"]["clean_before"]
)
)
except:
self.clean_before = True
try:
self.clean_after = bool(setuptools.distutils.util.strtobool(
parser["top"]["clean_after"]
)
)
except:
self.clean_after= True
for i in range(1, 10):
try:
......@@ -574,7 +594,7 @@ class Job:
if not tasks.empty:
## Cleaning before
if clean_before:
if clean_before or self.clean_before:
logger.info("Cleaning Tiles")
if self.logs:
f.write("{} - Cleaning Tiles\n\n".format(datetime.datetime.now()))
......@@ -1012,7 +1032,7 @@ class Job:
t.remove_l2a(prodlist)
# Cleaning after
if clean_after:
if clean_after or self.clean_after:
logger.info("Cleaning Tiles")
if self.logs:
f.write("{}\nCleaning Tiles\n\n".format(datetime.datetime.now()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment