forked from indymedia/epicyon
Remove oldest items from inbox queue if it is full
parent
b1e6df06a2
commit
323e806adb
|
@ -429,8 +429,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
"""
|
"""
|
||||||
# Check if the queue is full
|
# Check if the queue is full
|
||||||
if len(self.server.inboxQueue)>=self.server.maxQueueLength:
|
if len(self.server.inboxQueue)>=self.server.maxQueueLength:
|
||||||
print('Inbox queue is full')
|
print('Inbox queue is full. Removing oldest items.')
|
||||||
return 1
|
while len(self.server.inboxQueue) >= self.server.maxQueueLength-2:
|
||||||
|
self.server.inboxQueue.pop(0)
|
||||||
|
|
||||||
# Convert the headers needed for signature verification to dict
|
# Convert the headers needed for signature verification to dict
|
||||||
headersDict={}
|
headersDict={}
|
||||||
|
|
Loading…
Reference in New Issue