diff options
author | Marko Kreen | 2007-04-06 08:58:18 +0000 |
---|---|---|
committer | Marko Kreen | 2007-04-06 08:58:18 +0000 |
commit | b15b1be88ceda2b457f9b7d0258ae94e6128c090 (patch) | |
tree | 6a04277d8f40967cc0abff1d77a40c9e63a6dc63 /python/skytools/scripting.py | |
parent | 2c901a4b34b4fd7fc591e9fef9ce5820370b026d (diff) |
various tweaks to get regtest pass more predictibly
Diffstat (limited to 'python/skytools/scripting.py')
-rw-r--r-- | python/skytools/scripting.py | 9 |
1 files changed, 7 insertions, 2 deletions
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): |