def init(self): # init eventbus self.eventbus = RedisEventBus(self.name) # notify core event = Event("plugin.ready") #self.eventbus.dispatch(event) self.eventbus.publish(event, "plugin")
class Adapter(Thread): def __init__(self, name): Thread.__init__(self) self.name = name self.ready = False def init(self): # init eventbus self.eventbus = RedisEventBus(self.name) # notify core event = Event("adapter.ready") #self.eventbus.dispatch(event) self.eventbus.publish(event, "adapter") def shutdown(self): pass