Commit d9dcf8d9 authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fix for not recognizing already processed L2A+ datasets if there is a L1C dataset.

Former-commit-id: ffd1c6bd
Former-commit-id: 964feda4
parent 634585b3
......@@ -137,7 +137,7 @@ class process_controller(object):
def get_AllWrittenProcL_dueLog(path_log): # TODO replace this by database query + os.path.exists
"""Returns all processing level that have been successfully written according to logfile."""
if not os.path.exists(path_log):
if not os.path.exists(path_log) and path_log != path_logfile_merged_ss:
self.logger.info("No logfile named '%s' found for %s at %s. Dataset has to be reprocessed."
% (os.path.basename(path_log), dataset['entity_ID'], os.path.dirname(path_log)))
AllWrittenProcL_dueLog = []
......@@ -155,9 +155,10 @@ class process_controller(object):
if len(DB_match) == 1 or DB_match == [] or DB_match == 'database connection fault':
# get all processing level that have been successfully written
AllWrittenProcL = get_AllWrittenProcL_dueLog(path_logfile)
# NOTE: first check for merged subsystem datasets because they have hiver processing levels
AllWrittenProcL = get_AllWrittenProcL_dueLog(path_logfile_merged_ss)
if not AllWrittenProcL:
AllWrittenProcL = get_AllWrittenProcL_dueLog(path_logfile_merged_ss)
AllWrittenProcL = get_AllWrittenProcL_dueLog(path_logfile)
dataset['proc_level'] = None # default (dataset has to be reprocessed)
......@@ -248,7 +249,7 @@ class process_controller(object):
if not len(list(set(proc_lvls))) == 1:
# reset processing level of those scenes where not all subsystems are available
self.logger.info('%s: Found already processed subsystems at different processing levels %s. '
'Dataset has to be reprocessed to avoid errors'
'Dataset has to be reprocessed to avoid errors.'
% (ds_group[0]['entity_ID'], proc_lvls))
for ds in ds_group:
......
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