diff --git a/inbox.py b/inbox.py index 00ba2f290..5fa85eceb 100644 --- a/inbox.py +++ b/inbox.py @@ -2138,6 +2138,8 @@ def runInboxQueue(recentPostsCache: {},maxRecentPosts: int, \ if quotasPerMin['domains'].get(postDomain): domainMaxPostsPerMin=int(domainMaxPostsPerDay/(24*60)) + if domainMaxPostsPerMin<10: + domainMaxPostsPerMin=10 if quotasPerMin['domains'][postDomain]>domainMaxPostsPerMin: print('DEBUG: Quota per min - Maximum posts for '+postDomain+' reached ('+str(domainMaxPostsPerMin)+')') if len(queue)>0: @@ -2169,6 +2171,8 @@ def runInboxQueue(recentPostsCache: {},maxRecentPosts: int, \ if quotasPerMin['accounts'].get(postHandle): accountMaxPostsPerMin=int(accountMaxPostsPerDay/(24*60)) + if accountMaxPostsPerMin<10: + accountMaxPostsPerMin=10 if quotasPerMin['accounts'][postHandle]>accountMaxPostsPerMin: print('DEBUG: Quota account posts per min - Maximum posts for '+postHandle+' reached ('+str(accountMaxPostsPerMin)+')') if len(queue)>0: diff --git a/tests.py b/tests.py index 73df80d27..273aff329 100644 --- a/tests.py +++ b/tests.py @@ -577,7 +577,7 @@ def testPostMessageBetweenServers(): outboxAfterAnnounceCount=len([name for name in os.listdir(outboxPath) if os.path.isfile(os.path.join(outboxPath, name))]) print('inbox items after announce: '+str(afterAnnounceCount)) print('outbox items after announce: '+str(outboxAfterAnnounceCount)) - #assert afterAnnounceCount==beforeAnnounceCount+1 + assert afterAnnounceCount==beforeAnnounceCount+1 assert outboxAfterAnnounceCount==outboxBeforeAnnounceCount+1 # stop the servers thrAlice.kill()