def __init__(self, **kwargs): self.address = kwargs.get("address", "*") self.reply_port = kwargs.get("reply_port", 5555) self.publish_port = kwargs.get("publish_port", 5556) self.protocol = kwargs.get("protocol", "tcp") self.publish_socket = None self.reply_socket = None self.tasks = {} # need persistance / repl. later self.clients = {} # need persistance / repl. later self.nodes = {} # need persistance / repl. later Server.__init__(self)
def __init__(self, **kwargs): self.address = kwargs.get("address", "*") self.reply_port = kwargs.get("reply_port", 5555) self.publish_port = kwargs.get("publish_port", 5556) self.protocol = kwargs.get("protocol", "tcp") self.publish_socket = None self.reply_socket = None self.tasks = {} # need persistance / repl. later self.clients = {} # need persistance / repl. later self.nodes = {} # need persistance / repl. later Server.__init__(self)
def __init__(self, queue, result, **kwargs): self.name = kwargs.get("name", "worker") self.queue_uri = "ipc://%s" % queue self.result_uri = "ipc://%s" % result Server.__init__(self, **kwargs)
def __init__(self, queue, result, **kwargs): self.name = kwargs.get("name", "worker") self.queue_uri = "ipc://%s" % queue self.result_uri = "ipc://%s" % result Server.__init__(self, **kwargs)
def __init__(self, **kwargs): self.node_id = kwargs.get("node_id", None) self.running_tasks = 0 self.workers = [] self.worker_count = kwargs.get("workers", 1) # 1 worker by default Server.__init__(self)