From 5dcac0c8efe60dd4ca219508ddedf5a949876f09 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 20 Sep 2018 17:03:46 +0100 Subject: [PATCH] output_processors/postgres: Do not process output if not connected Only try to process the run output if the processor is connected to a database. --- wa/output_processors/postgresql.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wa/output_processors/postgresql.py b/wa/output_processors/postgresql.py index 5218e7b7..72452aff 100644 --- a/wa/output_processors/postgresql.py +++ b/wa/output_processors/postgresql.py @@ -254,6 +254,8 @@ class PostgresqlResultProcessor(OutputProcessor): ''' A final export of the RunOutput that updates existing parameters and uploads ones which are only generated after jobs have run. ''' + if not self.cursor: # Database did not connect correctly. + return self.current_job_uuid = None # Update the job statuses following completion of the run for job in run_output.jobs: