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

Bugfix.

Former-commit-id: 4897c882
Former-commit-id: f08faacb
parent 05a7271e
......@@ -10,7 +10,7 @@ import time
from itertools import chain
import signal
import re
from typing import TYPE_CHECKING
from typing import TYPE_CHECKING, List
from ..io import output_writer as OUT_W
from ..io import input_reader as INP_R
......@@ -121,9 +121,9 @@ class process_controller(object):
return [obj.scene_ID for obj in self.failed_objects]
def add_local_availability(self, datasets):
# type: (list) -> list
# type: (List[OrderedDict]) -> List[OrderedDict]
# TODO revise this function
for dataset in datasets:
def check_single_dataset(dataset):
# query the database and get the last written processing level and LayerBandsAssignment
DB_match = DB_T.get_info_from_postgreSQLdb(
GMS_config.conn_database, 'scenes_proc', ['proc_level', 'layer_bands_assignment'],
......@@ -225,6 +225,10 @@ class process_controller(object):
else:
dataset['proc_level'] = None
return dataset
datasets = MAP(check_single_dataset, datasets)
#############################################################
# check availability of all subsets per scene an proc_level #
#############################################################
......@@ -237,8 +241,8 @@ 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 %s. Remaining subsystems are missing. '
'Therefore, the dataset has to be reprocessed.'
self.logger.info('%s: Found already processed subsystems at differnt processing levels %s. '
'Dataset has to be reprocessed to avoid errors'
% (ds_group[0]['entity_ID'], proc_lvls))
for ds in ds_group:
......
......@@ -165,10 +165,10 @@ class BaseTestCases:
cls.PC.logger.info('Execution of entire GeoMultiSens pre-processing chain started for job ID %s...'
% cls.PC.config.ID)
# update attributes of DB_job_record and related DB entry
cls.PC.config.DB_job_record.reset_job_progress()
cls.PC.config.data_list = cls.PC.add_local_availability(cls.PC.config.data_list)
# # update attributes of DB_job_record and related DB entry
# cls.PC.config.DB_job_record.reset_job_progress()
#
# cls.PC.config.data_list = cls.PC.add_local_availability(cls.PC.config.data_list)
[cls.validate_db_entry(ds['filename']) for ds in cls.PC.config.data_list]
......
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