Example #1
0
    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")
Example #2
0
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