Commit 3a8479ed authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Fixed multiprocessing issue.

Former-commit-id: 685a3793
Former-commit-id: 79a92472
parent aecc2f67
......@@ -120,10 +120,9 @@ class process_controller(object):
def sceneids_failed(self):
return [obj.scene_ID for obj in self.failed_objects]
def add_local_availability(self, datasets):
# type: (List[OrderedDict]) -> List[OrderedDict]
def _add_local_availability_single_dataset(self, dataset):
# type: (OrderedDict) -> OrderedDict
# TODO revise this function
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'],
......@@ -227,11 +226,16 @@ class process_controller(object):
return dataset
datasets = MAP(check_single_dataset, datasets)
def add_local_availability(self, datasets):
# type: (List[OrderedDict]) -> List[OrderedDict]
"""Check availability of all subsets per scene and processing level.
NOTE: The processing level of those scenes, where not all subsystems are available in the same processing level
is reset.
#############################################################
# check availability of all subsets per scene an proc_level #
#############################################################
:param datasets: List of one OrderedDict per subsystem as generated by CFG.data_list
"""
datasets = [self._add_local_availability_single_dataset(ds) for ds in datasets]
datasets_validated = []
datasets_grouped = HLP_F.group_dicts_by_key(datasets, key='scene_ID')
......@@ -241,7 +245,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 differnt processing levels %s. '
self.logger.info('%s: Found already processed subsystems at different processing levels %s. '
'Dataset has to be reprocessed to avoid errors'
% (ds_group[0]['entity_ID'], proc_lvls))
......
......@@ -165,11 +165,6 @@ 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)
[cls.validate_db_entry(ds['filename']) for ds in cls.PC.config.data_list]
def test_run_all_processors(self):
......
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