Example #1
0
 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)))
Example #2
0
 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()
Example #4
0
 def __init__(self, channel, handler_factory, *args, **kwargs):
     RedisSubscriber.__init__(self, *args, **kwargs)
     self.channel = channel
     self.handler_factory = handler_factory
     self.status = "initialized"
Example #5
0
 def connectionMade(self):
     d = RedisSubscriber.connectionMade(self)
     d.addCallback(lambda r:self.subscribeChannels())
Example #6
0
 def __init__(self, *args,**kwargs):
     dictOfcallback = kwargs.pop("dictOfcallback",{})
     self.dictOfcallback = dictOfcallback
     RedisSubscriber.__init__(self,*args,**kwargs)
Example #7
0
 def connectionMade(self):
     d = RedisSubscriber.connectionMade(self)
     d.addCallback(lambda r: self.subscribeChannels())
Example #8
0
 def __init__(self, *args, **kwargs):
     dictOfcallback = kwargs.pop("dictOfcallback", {})
     self.dictOfcallback = dictOfcallback
     RedisSubscriber.__init__(self, *args, **kwargs)
Example #9
0
 def __init__(self, request_channel, op_factory, *args, **kwargs):
     RedisSubscriber.__init__(self, *args, **kwargs)
     self.channel = request_channel
     self.op_factory = op_factory
Example #10
0
 def __init__(self, request_channel, op_factory, *args, **kwargs):
     RedisSubscriber.__init__(self, *args, **kwargs)
     self.channel = request_channel
     self.op_factory = op_factory
Example #11
0
 def __init__(self, websocket_factory):
     RedisSubscriber.__init__(self)
     self.websocket_factory = websocket_factory
 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()