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

Increased database timeout for job statistics update (might fix issue #61).

parent 7f7db3a2
......@@ -160,7 +160,8 @@ class ExceptionHandler(object):
DB_T.increment_decrement_arrayCol_in_postgreSQLdb(
CFG.conn_database, 'jobs', 'statistics', cond_dict={'id': CFG.ID},
idx_val2decrement=db_jobs_statistics_def['pending'],
idx_val2increment=db_jobs_statistics_def['started'])
idx_val2increment=db_jobs_statistics_def['started'],
timeout=30000)
def increment_progress(self):
"""Update statistics column in jobs table of postgreSQL database.
......@@ -200,7 +201,8 @@ class ExceptionHandler(object):
DB_T.increment_decrement_arrayCol_in_postgreSQLdb(
CFG.conn_database, 'jobs', 'statistics', cond_dict={'id': CFG.ID},
idx_val2decrement=db_jobs_statistics_def[GMS_obj.proc_level] - 1,
idx_val2increment=db_jobs_statistics_def[GMS_obj.proc_level])
idx_val2increment=db_jobs_statistics_def[GMS_obj.proc_level],
timeout=30000)
@staticmethod
def update_progress_failed(failed_Obj, procL_failed=None):
......@@ -213,7 +215,8 @@ class ExceptionHandler(object):
DB_T.increment_decrement_arrayCol_in_postgreSQLdb(
CFG.conn_database, 'jobs', 'statistics', cond_dict={'id': CFG.ID},
idx_val2decrement=db_jobs_statistics_def[procL_failed or failed_Obj.proc_level],
idx_val2increment=db_jobs_statistics_def['FAILED'])
idx_val2increment=db_jobs_statistics_def['FAILED'],
timeout=30000)
def handle_failed(self):
_, exc_val, exc_tb = self.exc_details
......
......@@ -748,7 +748,8 @@ class process_controller(object):
DB_T.increment_decrement_arrayCol_in_postgreSQLdb(
self.config.conn_database, 'jobs', 'statistics', cond_dict={'id': self.config.ID},
idx_val2decrement=db_jobs_statistics_def['pending'],
idx_val2increment=db_jobs_statistics_def[ds['proc_level']])
idx_val2increment=db_jobs_statistics_def[ds['proc_level']],
timeout=30000)
# avoid double updating in case of subsystems belonging to the same scene ID
already_updated_IDs.append(ds['scene_ID'])
......
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