Fix tests when running for long time

This commit is contained in:
shortcutme 2019-12-17 14:34:29 +01:00
parent 6539ca5eb0
commit e91fb90a45
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
3 changed files with 9 additions and 3 deletions

View file

@ -25,7 +25,7 @@ class ContentDbPlugin(object):
self.my_optional_files = {} # Last 50 site_address/inner_path called by fileWrite (auto-pinning these files)
self.optional_files = collections.defaultdict(dict)
self.optional_files_loading = False
helper.timer(60 * 5, self.checkOptionalLimit)
self.timer_check_optional = helper.timer(60 * 5, self.checkOptionalLimit)
super(ContentDbPlugin, self).__init__(*args, **kwargs)
def getSchema(self):

View file

@ -19,6 +19,8 @@ def importPluginnedClasses():
def processAccessLog():
if access_log:
content_db = ContentDbPlugin.content_db
if not content_db.conn:
return False
now = int(time.time())
num = 0
for site_id in access_log:
@ -33,6 +35,8 @@ def processAccessLog():
def processRequestLog():
if request_log:
content_db = ContentDbPlugin.content_db
if not content_db.conn:
return False
cur = content_db.getCursor()
num = 0
for site_id in request_log: