Commit 7f7383ab authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

fixed improper updating of job statistics in case a processing level has been skipped.

- run_all_processors(): added job statistics updater after checking local availability
- added update_DB_job_statistics()

- updated __version__
parent 45f4b9af
......@@ -15,7 +15,7 @@ from . import config
from .processing.process_controller import process_controller
__version__ = '20170330.02'
__version__ = '20170330.03'
__author__ = 'Daniel Scheffler'
__all__ = ['algorithms',
......@@ -28,7 +28,7 @@ from .pipeline import (L1A_map, L1A_map_1, L1A_map_2, L1A_map_3, L
L2A_map, L2B_map, L2C_map)
from ..config import set_config, GMS_config
from .multiproc import MAP
from ..misc.definition_dicts import proc_chain
from ..misc.definition_dicts import proc_chain, db_jobs_statistics_def
class process_controller(object):
......@@ -339,6 +339,7 @@ class process_controller(object):
Run all processors at once.
signal.signal(signal.SIGINT, self.stop) # enable clean shutdown possibility
......@@ -360,6 +361,7 @@ class process_controller(object):
# add local availability
self.usecase.data_list = MAP(self.add_local_availability, self.usecase.data_list)
......@@ -623,6 +625,7 @@ class process_controller(object):
Update the database records of the current job (table 'jobs').
# TODO move this method to config.Job
# update 'failed_sceneids' column of job record within jobs table
sceneids_failed = list(set([obj.scene_ID for obj in self.failed_objects]))
......@@ -633,6 +636,19 @@ class process_controller(object):
{'id': self.job.ID})
def update_DB_job_statistics(self, usecase_datalist):
Update job statistics of the running job in the database.
# TODO move this method to config.Job
for ds in usecase_datalist:
if ds['proc_level'] is not None:
self.job.conn_database, 'jobs', 'statistics', cond_dict={'id': self.job.ID},
def create_job_summary(self):
Create job success summary
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