Reduce maximum posts

main2
Bob Mottram 2019-10-19 11:23:49 +01:00
parent 514630d3b9
commit 4d349544ed
3 changed files with 5 additions and 5 deletions

View File

@ -4714,7 +4714,7 @@ def runDaemon(projectVersion, \
httpd.maxPostLength=1024*1024*30
httpd.maxMediaSize=httpd.maxPostLength
httpd.maxMessageLength=5000
httpd.maxPostsInBox=100000
httpd.maxPostsInBox=32000
httpd.domain=domain
httpd.port=port
httpd.domainFull=domain

View File

@ -1031,7 +1031,7 @@ if args.changepassword:
archiveWeeks=4
if args.archiveWeeks:
archiveWeeks=args.archiveWeeks
archiveMaxPosts=100000
archiveMaxPosts=32000
if args.archiveMaxPosts:
archiveMaxPosts=args.archiveMaxPosts

View File

@ -2116,7 +2116,7 @@ def createBoxBase(session,baseDir: str,boxname: str, \
return boxHeader
return boxItems
def expireCache(baseDir: str,personCache: {},httpPrefix: str,archiveDir: str,maxPostsInBox=100000):
def expireCache(baseDir: str,personCache: {},httpPrefix: str,archiveDir: str,maxPostsInBox=32000):
"""Thread used to expire actors from the cache and archive old posts
"""
while True:
@ -2125,7 +2125,7 @@ def expireCache(baseDir: str,personCache: {},httpPrefix: str,archiveDir: str,max
expirePersonCache(basedir,personCache)
archivePosts(baseDir,httpPrefix,archiveDir,maxPostsInBox)
def archivePosts(baseDir: str,httpPrefix: str,archiveDir: str,maxPostsInBox=100000) -> None:
def archivePosts(baseDir: str,httpPrefix: str,archiveDir: str,maxPostsInBox=32000) -> None:
"""Archives posts for all accounts
"""
if archiveDir:
@ -2159,7 +2159,7 @@ def archivePosts(baseDir: str,httpPrefix: str,archiveDir: str,maxPostsInBox=1000
maxPostsInBox)
def archivePostsForPerson(httpPrefix: str,nickname: str,domain: str,baseDir: str, \
boxname: str,archiveDir: str,maxPostsInBox=100000) -> None:
boxname: str,archiveDir: str,maxPostsInBox=32000) -> None:
"""Retain a maximum number of posts within the given box
Move any others to an archive directory
"""