Moved portCheckerQueue and receiveDataQueue to network module #2257

Merged
anand-skss merged 1 commits from test1 into v0.6 2024-07-07 13:51:06 +02:00
8 changed files with 14 additions and 10 deletions

View File

@ -1,6 +1,7 @@
"""
Network subsystem package
"""
from six.moves import queue
from .dandelion import Dandelion
from .threads import StoppableThread
from .multiqueue import MultiQueue
@ -10,6 +11,8 @@ dandelion_ins = Dandelion()
# network queues
invQueue = MultiQueue()
addrQueue = MultiQueue()
portCheckerQueue = queue.Queue()
receiveDataQueue = queue.Queue()
__all__ = ["StoppableThread"]

View File

@ -17,7 +17,7 @@ import protocol
import state
import connectionpool
from bmconfigparser import config
from queues import objectProcessorQueue, portCheckerQueue
from queues import objectProcessorQueue
from randomtrackingdict import RandomTrackingDict
from network.advanceddispatcher import AdvancedDispatcher
from network.bmobject import (
@ -26,7 +26,7 @@ from network.bmobject import (
BMObjectUnwantedStreamError
)
from network.proxy import ProxyError
from network import dandelion_ins, invQueue
from network import dandelion_ins, invQueue, portCheckerQueue
from node import Node, Peer
from objectracker import ObjectTracker, missingObjects

View File

@ -5,11 +5,14 @@ Select which node to connect to
import logging
import random
from six.moves import queue
PeterSurda commented 2024-07-06 16:46:25 +02:00 (Migrated from github.com)
Review

it's probably better to split like this:

from six.moves import queue
from network import portCheckerQueue
it's probably better to split like this: ``` from six.moves import queue from network import portCheckerQueue ```
import knownnodes
import protocol
import state
from bmconfigparser import config
from queues import queue, portCheckerQueue
from network import portCheckerQueue
logger = logging.getLogger('default')

View File

@ -7,7 +7,7 @@ import socket
import connectionpool
from network.advanceddispatcher import UnknownStateError
from queues import receiveDataQueue
from network import receiveDataQueue
from threads import StoppableThread

View File

@ -17,8 +17,8 @@ import state
import connectionpool
from bmconfigparser import config
from highlevelcrypto import randomBytes
from network import dandelion_ins, invQueue
from queues import receiveDataQueue, UISignalQueue
from network import dandelion_ins, invQueue, receiveDataQueue
from queues import UISignalQueue
from tr import _translate
import asyncore_pollchoose as asyncore

View File

@ -10,7 +10,7 @@ import sys
import network.asyncore_pollchoose as asyncore
import paths
from network.advanceddispatcher import AdvancedDispatcher
from queues import receiveDataQueue
from network import receiveDataQueue
logger = logging.getLogger('default')

View File

@ -9,8 +9,8 @@ import time
import protocol
import state
import connectionpool
from queues import receiveDataQueue
from network import receiveDataQueue
from bmproto import BMProto
from node import Peer
from objectracker import ObjectTracker

View File

@ -39,8 +39,6 @@ addressGeneratorQueue = queue.Queue()
#: `.network.ReceiveQueueThread` instances dump objects they hear
#: on the network into this queue to be processed.
objectProcessorQueue = ObjectProcessorQueue()
portCheckerQueue = queue.Queue()
receiveDataQueue = queue.Queue()
#: The address generator thread uses this queue to get information back
#: to the API thread.
apiAddressGeneratorReturnQueue = queue.Queue()