<gh_stars>0
from redis import StrictRedis

redis = None


def get_redis():
    redis_config = {
        'host': '192.168.3.11',
        'password': '<PASSWORD>',
        'port': 6379,
    }
    global redis
    if redis:
        return redis
    redis = StrictRedis(socket_connect_timeout=3, **redis_config)
    return redis

from redis import StrictRedis

redis = None


def get_redis():
    redis_config = {
        'host': '192.168.3.11',
        'password': '<PASSWORD>',
        'port': 6379,
    }
    global redis
    if redis:
        return redis
    redis = StrictRedis(socket_connect_timeout=3, **redis_config)
    return redis