From ea08b7b7f8ccd98cc01319fbabaeb22d71a0f0d2 Mon Sep 17 00:00:00 2001
From: Karim Ahmed <karim.ahmed@xfel.eu>
Date: Thu, 22 Aug 2019 15:10:23 +0200
Subject: [PATCH] better timeout default set

---
 reportservice/report_service.py | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/reportservice/report_service.py b/reportservice/report_service.py
index d0995b788..1552dee15 100644
--- a/reportservice/report_service.py
+++ b/reportservice/report_service.py
@@ -205,11 +205,7 @@ async def server_runner(conf_file):
         async def do_action(cfg):
             logging.info('Run plot production')
 
-            try:
-                jobs_timeout = cfg['GLOBAL']['report-service']['job-timeout']
-            except:
-                # Default value of 1 hour timeout, if none was set. 
-                jobs_timeout = 3600
+            jobs_timeout = cfg['GLOBAL']['report-service'].get('job-timeout', 3600)
 
             all_new_files = []
             all_new_files.append('{}/{}'.format(config['GLOBAL']
-- 
GitLab