forked from indymedia/epicyon
Zero values disable quotas
parent
ce6a60e66e
commit
1b3e381bfc
3
inbox.py
3
inbox.py
|
@ -876,6 +876,7 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [], \
|
|||
# limit the number of posts which can arrive per domain per day
|
||||
postDomain=queueJson['postDomain']
|
||||
if postDomain:
|
||||
if domainMaxPostsPerDay>0:
|
||||
if quotas['domains'].get(postDomain):
|
||||
if quotas['domains'][postDomain]>domainMaxPostsPerDay:
|
||||
queue.pop(0)
|
||||
|
@ -884,6 +885,7 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [], \
|
|||
else:
|
||||
quotas['domains'][postDomain]=1
|
||||
|
||||
if accountMaxPostsPerDay>0:
|
||||
postHandle=queueJson['postNickname']+'@'+postDomain
|
||||
if quotas['accounts'].get(postHandle):
|
||||
if quotas['accounts'][postHandle]>accountMaxPostsPerDay:
|
||||
|
@ -894,6 +896,7 @@ def runInboxQueue(baseDir: str,httpPrefix: str,sendThreads: [],postLog: [], \
|
|||
quotas['accounts'][postHandle]=1
|
||||
|
||||
if debug:
|
||||
if accountMaxPostsPerDay>0 or domainMaxPostsPerDay>0:
|
||||
pprint(quotas)
|
||||
|
||||
# Try a few times to obtain the public key
|
||||
|
|
Loading…
Reference in New Issue