def __init__(self, ebus): DataChunk.__init__(self) subscriber.__init__(self) self.ebus = ebus self.clientId = None self.allclients = get_client() self.registered = False self.peer = None
def __init__(self,eventbus,parser): with open('passwd.txt', 'r') as f: passwd = [a.strip() for a in f.readlines()] threading.Thread.__init__(self) Client.__init__(self,passwd[0],passwd[1]) subscriber.__init__(self) self.parser = parser self.eb = eventbus print("Registering Topics") self.eb.register_consumer(self,EVENTID_CLIENT_SEND) self.eb.register_consumer(self,EVENTID_CLIENT_STOP) self.eb.register_consumer(self,EVENTID_CLIENT_START) self.eb.register_consumer(self,EVENTID_CLIENT_SNAPSHOT)
def __init__(self, ebus): global lc subscriber.__init__(self) self.biglock = Lock() self.keep_running = True self.alllocks = {} self.partitionlock = {} self.clientlocks = {} self.ebus = ebus self.ebus.register_consumer(self, 'unreg') logging.info('Lock container initialized') self.partions = [] self.__init__partitions() lc = self