mirror of
https://github.com/markqvist/LXMF.git
synced 2025-02-24 00:49:47 -05:00
Enqueue and batch process distribution queue mappings
This commit is contained in:
parent
1430b1ce90
commit
c2a08ef355
@ -656,15 +656,16 @@ class LXMRouter:
|
||||
time.sleep(LXMRouter.PROCESSING_INTERVAL)
|
||||
|
||||
def flush_queues(self):
|
||||
self.flush_peer_distribution_queue()
|
||||
RNS.log("Calculating peer distribution queue mappings...", RNS.LOG_DEBUG); st = time.time()
|
||||
for peer_id in self.peers.copy():
|
||||
if peer_id in self.peers:
|
||||
peer = self.peers[peer_id]
|
||||
if peer.queued_items():
|
||||
peer.process_queues()
|
||||
if len(self.peers) > 0:
|
||||
self.flush_peer_distribution_queue()
|
||||
RNS.log("Calculating peer distribution queue mappings...", RNS.LOG_DEBUG); st = time.time()
|
||||
for peer_id in self.peers.copy():
|
||||
if peer_id in self.peers:
|
||||
peer = self.peers[peer_id]
|
||||
if peer.queued_items():
|
||||
peer.process_queues()
|
||||
|
||||
RNS.log(f"Distribution queue mapping completed in {RNS.prettytime(time.time()-st)}", RNS.LOG_DEBUG)
|
||||
RNS.log(f"Distribution queue mapping completed in {RNS.prettytime(time.time()-st)}", RNS.LOG_DEBUG)
|
||||
|
||||
def clean_links(self):
|
||||
closed_links = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user