From c2cda3bf87d9827e6764b3ee9ae27edd3e8936d5 Mon Sep 17 00:00:00 2001 From: Chaz Date: Sat, 4 Dec 2010 17:33:57 -0500 Subject: [PATCH] Added sessionTimeout Import field to Configuration.py and the Hud_config files. Default set to 30 minutes to start a new session --- pyfpdb/Configuration.py | 6 +++++- pyfpdb/HUD_config.test.xml | 6 +++--- pyfpdb/HUD_config.xml.example | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index ed12f7a4..a0ad4bad 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -480,12 +480,13 @@ class Import: self.hhBulkPath = node.getAttribute("hhBulkPath") self.saveActions = string_to_bool(node.getAttribute("saveActions"), default=False) self.cacheSessions = string_to_bool(node.getAttribute("cacheSessions"), default=False) + self.sessionTimeout = string_to_bool(node.getAttribute("sessionTimeout"), default=30) self.fastStoreHudCache = string_to_bool(node.getAttribute("fastStoreHudCache"), default=False) self.saveStarsHH = string_to_bool(node.getAttribute("saveStarsHH"), default=False) def __str__(self): return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s\n saveActions = %s\n fastStoreHudCache = %s\n" \ - % (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.fastStoreHudCache) + % (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.sessionTimeout, self.fastStoreHudCache) class HudUI: def __init__(self, node): @@ -1263,6 +1264,9 @@ class Config: try: imp['cacheSessions'] = self.imp.cacheSessions except: imp['cacheSessions'] = False + + try: imp['sessionTimeout'] = self.imp.sessionTimeout + except: imp['sessionTimeout'] = 30 try: imp['saveStarsHH'] = self.imp.saveStarsHH except: imp['saveStarsHH'] = False diff --git a/pyfpdb/HUD_config.test.xml b/pyfpdb/HUD_config.test.xml index f62a13bf..cb835aff 100644 --- a/pyfpdb/HUD_config.test.xml +++ b/pyfpdb/HUD_config.test.xml @@ -2,7 +2,7 @@ - +