From b15b1be88ceda2b457f9b7d0258ae94e6128c090 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Fri, 6 Apr 2007 08:58:18 +0000 Subject: various tweaks to get regtest pass more predictibly --- python/skytools/scripting.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'python/skytools/scripting.py') diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py index cf976801..456fff69 100644 --- a/python/skytools/scripting.py +++ b/python/skytools/scripting.py @@ -396,13 +396,14 @@ class DBScript(object): self.stat_dict = {} def get_database(self, dbname, autocommit = 0, isolation_level = -1, - cache = None, max_age = DEF_CONN_AGE): + cache = None): """Load cached database connection. User must not store it permanently somewhere, as all connections will be invalidated on reset. """ + max_age = self.cf.getint('connection_lifetime', DEF_CONN_AGE) if not cache: cache = dbname if cache in self.db_cache: @@ -506,7 +507,11 @@ class DBScript(object): return 1 def work(self): - "Here should user's processing happen." + """Here should user's processing happen. + + Return value is taken as boolean - if true, the next loop + starts immidiately. If false, DBScript sleeps for a loop_delay. + """ raise Exception("Nothing implemented?") def startup(self): -- cgit v1.2.3