def subscribe(self, event_classes): '''Subscribe to specific type of events :param event_classes: list of event classes, extending one of interfaces in the ckanext.realtime.event.base module :type event_classes: list ''' channels = [ec.event_name for ec in event_classes] RedisSubscriber.subscribe(self, *channels) log.msg('subscribed to {} new channels'.format(len(channels)))
def __init__(self, channel, handler_factory, *args, **kwargs): RedisSubscriber.__init__(self, *args, **kwargs) self.channel = channel self.handler_factory = handler_factory self.status = "initialized"
def __init__(self, *args, **kwargs): RedisSubscriber.__init__(self, *args, **kwargs) self.msg_channel = None self.msg_message = None self.msg_received = defer.Deferred() self.channel_subscribed = defer.Deferred()
def connectionMade(self): d = RedisSubscriber.connectionMade(self) d.addCallback(lambda r:self.subscribeChannels())
def __init__(self, *args,**kwargs): dictOfcallback = kwargs.pop("dictOfcallback",{}) self.dictOfcallback = dictOfcallback RedisSubscriber.__init__(self,*args,**kwargs)
def connectionMade(self): d = RedisSubscriber.connectionMade(self) d.addCallback(lambda r: self.subscribeChannels())
def __init__(self, *args, **kwargs): dictOfcallback = kwargs.pop("dictOfcallback", {}) self.dictOfcallback = dictOfcallback RedisSubscriber.__init__(self, *args, **kwargs)
def __init__(self, request_channel, op_factory, *args, **kwargs): RedisSubscriber.__init__(self, *args, **kwargs) self.channel = request_channel self.op_factory = op_factory
def __init__(self, websocket_factory): RedisSubscriber.__init__(self) self.websocket_factory = websocket_factory