Commit 6c703b6d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Added additional logging. Fixed missing call of PC.DB_job_record.reset_job_progress() within tests.

Former-commit-id: 3016e4fb
parent 1cdff315
......@@ -22,6 +22,8 @@ def trace_unhandled_exceptions(func):
def wrapped_func(*args, **kwargs):
result = None
# noinspection PyBroadException
result = func(*args, **kwargs)
except Exception:
......@@ -73,6 +75,7 @@ class ExceptionHandler(object):
self.GMS_mapper_name = GMS_mapper.__name__
self.GMS_objs = GMS_objs
# noinspection PyBroadException
......@@ -142,7 +145,9 @@ class ExceptionHandler(object):
update statistics column in jobs table of postgreSQL database to 'started'"""
if isinstance(self.GMS_objs, collections.OrderedDict) and self.GMS_objs['proc_level'] is None:
if not self.GMS_objs['subsystem'] in ['VNIR2', 'SWIR', 'TIR', 'S2A20', 'S2A60']:
if not self.GMS_objs['subsystem'] or self.GMS_objs['subsystem'] in ['VNIR1', 'S2A10']:
self.logger.debug("Setting job statistics array to 'STARTED'.")
# update statistics column ONLY in case of full cube or first subsystem
CFG.job.conn_database, 'jobs', 'statistics', cond_dict={'id': CFG.job.ID},
......@@ -359,8 +359,9 @@ class process_controller(object):
self.profiler = Profiler() # or Profiler(use_signal=False), see below
self.profiler.start()'Execution of entire GeoMultiSens pre-processing chain started...')
self.DB_job_record.reset_job_progress() # updates attributs of DB_job_record and related DB entry'Execution of entire GeoMultiSens pre-processing chain started for job ID %s...'
% self.job.ID)
self.DB_job_record.reset_job_progress() # updates attributes of DB_job_record and related DB entry
self.job.status = 'running'
self.update_DB_job_record() # TODO implement that into job.status.setter
......@@ -92,6 +92,13 @@ class BaseTestCases:
def create_job(cls, jobID, config):
cls.PC = process_controller(jobID, parallelization_level='scenes', db_host='geoms', delete_old_output=True,
job_config_kwargs=config)'Execution of entire GeoMultiSens pre-processing chain started for job ID %s...'
% cls.PC.job.ID)
# update attributes of DB_job_record and related DB entry
[cls.PC.add_local_availability(ds) for ds in cls.PC.usecase.data_list]
[cls.validate_db_entry(ds['filename']) for ds in cls.PC.usecase.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