Author: nunofsantos
Date: 2008-12-02 12:03:00 -0500 (Tue, 02 Dec 2008)
New Revision: 2905
Modified:
mgmt/trunk/cumin/python/cumin/__init__.py
mgmt/trunk/cumin/python/cumin/model.py
mgmt/trunk/mint/python/mint/tools.py
Log:
rename dbexpire-* config params / command-line args to expire-*
Modified: mgmt/trunk/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/__init__.py 2008-12-02 16:54:29 UTC (rev 2904)
+++ mgmt/trunk/cumin/python/cumin/__init__.py 2008-12-02 17:03:00 UTC (rev 2905)
@@ -167,10 +167,10 @@
param = ConfigParameter(self, "user", str)
- param = ConfigParameter(self, "dbexpire-frequency", int)
+ param = ConfigParameter(self, "expire-frequency", int)
param.default = 600 # 10 minutes
- param = ConfigParameter(self, "dbexpire-threshold", int)
+ param = ConfigParameter(self, "expire-threshold", int)
param.default = 24 * 3600 # 1 day
def init(self):
Modified: mgmt/trunk/cumin/python/cumin/model.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/model.py 2008-12-02 16:54:29 UTC (rev 2904)
+++ mgmt/trunk/cumin/python/cumin/model.py 2008-12-02 17:03:00 UTC (rev 2905)
@@ -20,8 +20,8 @@
class CuminModel(object):
def __init__(self, app, data_uri):
self.app = app
- self.data = MintModel(data_uri, dbExpireFrequency=app.config.dbexpire_frequency,
\
- dbExpireThreshold=app.config.dbexpire_threshold, debug=False)
+ self.data = MintModel(data_uri, dbExpireFrequency=app.config.expire_frequency, \
+ dbExpireThreshold=app.config.expire_threshold, debug=False)
self.classes = list()
self.invocations = set()
Modified: mgmt/trunk/mint/python/mint/tools.py
===================================================================
--- mgmt/trunk/mint/python/mint/tools.py 2008-12-02 16:54:29 UTC (rev 2904)
+++ mgmt/trunk/mint/python/mint/tools.py 2008-12-02 17:03:00 UTC (rev 2905)
@@ -26,13 +26,13 @@
opt = CommandOption(self, "debug")
opt.description = "Enable debugging; print logging to console"
- opt = CommandOption(self, "dbexpire-frequency")
+ opt = CommandOption(self, "expire-frequency")
opt.argument = "FREQUENCY"
- opt.description = "Frequency (in seconds) of the database expiration
thread"
+ opt.description = "Frequency (in seconds) of the expiration thread"
- opt = CommandOption(self, "dbexpire-threshold")
+ opt = CommandOption(self, "expire-threshold")
opt.argument = "THRESHOLD"
- opt.description = "Threshold (in seconds) of the age of database records
before they're expired"
+ opt.description = "Threshold (in seconds) of the age of data before it is
expired"
def check(self):
if os.getuid() not in (os.stat(__file__).st_uid, 0):
@@ -80,8 +80,8 @@
ddef = "postgresql://cumin@localhost/cumin"
freqDefault = 600 # 10 minutes
thresholdDefault = 24 * 3600 # 1 day
- model = MintModel(opts.get("data", ddef),
opts.get("dbexpire-frequency", freqDefault), \
- opts.get("dbexpire-threshold", thresholdDefault),
debug=True)
+ model = MintModel(opts.get("data", ddef),
opts.get("expire-frequency", freqDefault), \
+ opts.get("expire-threshold", thresholdDefault),
debug=True)
model.check()
model.init()