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)
|
time.sleep(LXMRouter.PROCESSING_INTERVAL)
|
||||||
|
|
||||||
def flush_queues(self):
|
def flush_queues(self):
|
||||||
self.flush_peer_distribution_queue()
|
if len(self.peers) > 0:
|
||||||
RNS.log("Calculating peer distribution queue mappings...", RNS.LOG_DEBUG); st = time.time()
|
self.flush_peer_distribution_queue()
|
||||||
for peer_id in self.peers.copy():
|
RNS.log("Calculating peer distribution queue mappings...", RNS.LOG_DEBUG); st = time.time()
|
||||||
if peer_id in self.peers:
|
for peer_id in self.peers.copy():
|
||||||
peer = self.peers[peer_id]
|
if peer_id in self.peers:
|
||||||
if peer.queued_items():
|
peer = self.peers[peer_id]
|
||||||
peer.process_queues()
|
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):
|
def clean_links(self):
|
||||||
closed_links = []
|
closed_links = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user