def __init__(self, connexions=dict(), gui_address=None): """ Parameters ---------- connexions: dict {'STEP_NANE' : (STEP port in, STEP port out, STEP queue lengh max )} Port in, port out for socket for each next steps. Max queue lengh (-1 menans no maximum) gui_address : str GUI port for ZMQ 'hostname': + 'port' """ Process.__init__(self) Component.__init__(self, parent=None) self.gui_address = gui_address # list of available stages which receive next job # This list allow to use next_stage in a LRU (Last recently used) # pattern self.next_available_stages = dict() # queue jobs to be send to next_stage self.queue_jobs = dict() self.router_sockets = dict() self.dealer_sockets = dict() self.queue_limit = dict() self.connexions = connexions self.done = False self._stop = Value('i', 0) self._total_queue_size = Value('i', 0)
def __init__( self, coroutine, sock_job_for_me_port, name=None, connexions=dict(),main_connexion_name=None): """ Parameters ---------- coroutine : Class instance that contains init, run and finish methods sock_job_for_me_port: str Port number for input socket url name: str Stage name main_connexion_name : str Default next step name. Used to send data when destination is not provided connexions: dict {'STEP_NANE' : (zmq STEP_NANE port in)} Port number for socket for each next steps """ Process.__init__(self) Component.__init__(self,parent=None) self.name = name Connexions.__init__(self,main_connexion_name,connexions) self.coroutine = coroutine self.sock_job_for_me_url = 'tcp://localhost:' + sock_job_for_me_port self.done = False self.waiting_since = Value('i',0) self._nb_job_done = Value('i',0) self._stop = Value('i',0) self._running = Value('i',0)
def __init__(self, coroutine, sock_job_for_me_port, name=None, connections=None, main_connection_name=None): """ Parameters ---------- coroutine : Class instance that contains init, run and finish methods sock_job_for_me_port: str Port number for input socket url name: str Stage name main_connection_name : str Default next step name. Used to send data when destination is not provided connections: dict {'STEP_NANE' : (zmq STEP_NANE port in)} Port number for socket for each next steps """ Process.__init__(self) Component.__init__(self, parent=None) self.name = name Connections.__init__(self, main_connection_name, connections) self.coroutine = coroutine self.sock_job_for_me_url = 'tcp://localhost:' + sock_job_for_me_port self.done = False self.waiting_since = Value('i', 0) self._nb_job_done = Value('i', 0) self._stop = Value('i', 0) self._running = Value('i', 0)
def __init__(self, coroutine, name, main_connection_name, connections=None): """ Parameters ---------- coroutine : Class instance It contains init, run and finish methods name: str Producer name main_connection_name : str Default next step name. Used to send data when destination is not provided connections: dict {'STEP_NANE' : (zmq STEP_NANE port in)} Port number for socket for each next steps """ Process.__init__(self) Component.__init__(self, parent=None) self.name = name Connections.__init__(self, main_connection_name, connections) self.coroutine = coroutine self.other_requests = dict() self._nb_job_done = Value('i', 0) self._running = Value('i', 0) self.done = False
def __init__( self, connections=None, gui_address=None): """ Parameters ---------- connections: dict {'STEP_NANE' : (STEP port in, STEP port out, STEP queue lengh max )} Port in, port out for socket for each next steps. Max queue lengh (-1 menans no maximum) gui_address : str GUI port for ZMQ 'hostname': + 'port' """ Process.__init__(self) Component.__init__(self,parent=None) self.gui_address = gui_address # list of available stages which receive next job # This list allow to use next_stage in a LRU (Last recently used) # pattern self.next_available_stages = dict() # queue jobs to be send to next_stage self.queue_jobs = dict() self.router_sockets = dict() self.dealer_sockets = dict() self.queue_limit = dict() self.connections = connections or {} self.done = False self._stop = Value('i',0) self._total_queue_size = Value('i',0)
def __init__(self, coroutine, sock_consumer_port, _name=""): """ Parameters ---------- coroutine : Class instance that contains init, run and finish methods sock_consumer_port: str Port number for socket url """ Component.__init__(self, parent=None) Process.__init__(self) self.coroutine = coroutine self.sock_consumer_url = 'tcp://localhost:' + sock_consumer_port self.name = _name self._running = Value('i', 0) self._nb_job_done = Value('i', 0) self._stop = Value('i', 0)
def __init__( self, coroutine, sock_consumer_port, _name=""): """ Parameters ---------- coroutine : Class instance that contains init, run and finish methods sock_consumer_port: str Port number for socket url """ Component.__init__(self,parent=None) Process.__init__(self) self.coroutine = coroutine self.sock_consumer_url = 'tcp://localhost:' + sock_consumer_port self.name = _name self._running = Value('i',0) self._nb_job_done = Value('i',0) self._stop = Value('i',0)
def __init__(self, coroutine, name, main_connection_name, connections=None): """ Parameters ---------- coroutine : Class instance It contains init, run and finish methods name: str Producer name main_connection_name : str Default next step name. Used to send data when destination is not provided connections: dict {'STEP_NANE' : (zmq STEP_NANE port in)} Port number for socket for each next steps """ Process.__init__(self) Component.__init__(self,parent=None) self.name = name Connections.__init__(self, main_connection_name, connections) self.coroutine = coroutine self.other_requests=dict() self._nb_job_done = Value('i',0) self._running = Value('i',0) self.done = False