Moved portCheckerQueue and receiveDataQueue to network module #2257
|
@ -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"]
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -5,11 +5,14 @@ Select which node to connect to
|
|||
import logging
|
||||
import random
|
||||
|
||||
from six.moves import queue
|
||||
|
||||
|
||||
import knownnodes
|
||||
import protocol
|
||||
import state
|
||||
|
||||
from bmconfigparser import config
|
||||
from queues import queue, portCheckerQueue
|
||||
from network import portCheckerQueue
|
||||
|
||||
logger = logging.getLogger('default')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Reference in New Issue
Block a user
it's probably better to split like this: