singlebeat/beat.py
def rewrite_redis_url(self):
        """\
        if REDIS_SERVER is just an ip address, then we try to translate it to
        redis_url, redis://REDIS_SERVER so that it doesn't try to connect to
        localhost while you try to connect to another server
        :return:
        """
        if self.REDIS_SERVER.startswith('unix://') or \
                self.REDIS_SERVER.startswith('redis://') or \
                self.REDIS_SERVER.startswith('rediss://'):
            return self.REDIS_SERVER
        return 'redis://{}/'.format(self.REDIS_SERVER)
def rewrite_redis_url(self):
        """\
        if REDIS_SERVER is just an ip address, then we try to translate it to
        redis_url, redis://REDIS_SERVER so that it doesn't try to connect to
        localhost while you try to connect to another server
        :return:
        """
        if self.REDIS_SERVER.startswith('unix://') or \
                self.REDIS_SERVER.startswith('redis://') or \
                self.REDIS_SERVER.startswith('rediss://'):
            return self.REDIS_SERVER
        return 'redis://{}/'.format(self.REDIS_SERVER)
def rewrite_redis_url ( self ) : if self . REDIS_SERVER . startswith ( 'unix://' ) or self . REDIS_SERVER . startswith ( 'redis://' ) or self . REDIS_SERVER . startswith ( 'rediss://' ) : return self . REDIS_SERVER return 'redis://{}/' . format ( self . REDIS_SERVER )
\
        if REDIS_SERVER is just an ip address, then we try to translate it to
        redis_url, redis://REDIS_SERVER so that it doesn't try to connect to
        localhost while you try to connect to another server
        :return:
\ if REDIS_SERVER is just an ip address then we try to translate it to redis_url redis : // REDIS_SERVER so that it doesn t try to connect to localhost while you try to connect to another server : return :