connectordb/_websocket.py
def subscribe(self, stream, callback, transform=""):
        """Given a stream, a callback and an optional transform, sets up the subscription"""
        if self.status == "disconnected" or self.status == "disconnecting" or self.status == "connecting":
            self.connect()
        if self.status is not "connected":
            return False
        logging.debug("Subscribing to %s", stream)

        self.send({"cmd": "subscribe", "arg": stream, "transform": transform})
        with self.subscription_lock:
            self.subscriptions[stream + ":" + transform] = callback
        return True
def subscribe(self, stream, callback, transform=""):
        if self.status == "disconnected" or self.status == "disconnecting" or self.status == "connecting":
            self.connect()
        if self.status is not "connected":
            return False
        logging.debug("Subscribing to %s", stream)

        self.send({"cmd": "subscribe", "arg": stream, "transform": transform})
        with self.subscription_lock:
            self.subscriptions[stream + ":" + transform] = callback
        return True
def subscribe ( self , stream , callback , transform = "" ) : if self . status == "disconnected" or self . status == "disconnecting" or self . status == "connecting" : self . connect ( ) if self . status is not "connected" : return False logging . debug ( "Subscribing to %s" , stream ) self . send ( { "cmd" : "subscribe" , "arg" : stream , "transform" : transform } ) with self . subscription_lock : self . subscriptions [ stream + ":" + transform ] = callback return True
Given a stream, a callback and an optional transform, sets up the subscription
Given a stream a callback and an optional transform sets up the subscription