Fixed duplicated configuration key (in fact, two different keys that means same thing... :-) )

This commit is contained in:
Adolfo Gómez 2013-06-19 10:02:40 +00:00
parent 687d63556c
commit 4ee51ac268
2 changed files with 1 additions and 5 deletions

View File

@ -238,10 +238,6 @@ class GlobalConfig(object):
# Allowed "trusted sources" for request
TRUSTED_SOURCES = Config.section(SECURITY_SECTION).value('Trusted Hosts', '*')
# How long will a service "in use" be allowed to exists once a new publication is launched, defaults to 3 days
# This is expressed in hours
KEEP_IN_USE_HOURS = Config.section(GLOBAL_SECTION).value('Keep In Use Hours', '72')
initDone = False
@staticmethod

View File

@ -72,7 +72,7 @@ class PublicationCleaner(Job):
pass
# Now check too long "in use" services for all publications
now = getSqlDatetime()
removeFrom = now - timedelta(hours = GlobalConfig.KEEP_IN_USE_HOURS.getInt(True))
removeFrom = now - timedelta(hours = GlobalConfig.SESSION_EXPIRE_TIME.getInt(True))
for dsp in removables.filter(state_date__lt=removeFrom):
dsp.deployed_service.filter(in_use=True).update(in_use=False, state_date=now)
dsp.deployed_service.markOldUserServicesAsRemovables(dsp)