forked from shaba/openuds
Fixed duplicated configuration key (in fact, two different keys that means same thing... :-) )
This commit is contained in:
parent
687d63556c
commit
4ee51ac268
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user