docs: def get_redis_info():
      """Check Redis connection."""
      from kombu.utils.url import _parse_url as parse_redis_url
      from redis import (
          StrictRedis,
          ConnectionError as RedisConnectionError,
          ResponseError as RedisResponseError,
      )
      for conf_name in ('REDIS_URL', 'BROKER_URL', 'CELERY_BROKER_URL'):
          if hasattr(settings, conf_name):
              url = getattr(settings, conf_name)
              if url.startswith('redis://'):
                  break
      else:
          log.error("No redis connection info found in settings.")
          return {"status": NO_CONFIG}
      _, host, port, _, password, database, _ = parse_redis_url(url)
  
      start = datetime.now()
      try:
          rdb = StrictRedis(
              host=host, port=port, db=database,
              password=password, socket_timeout=TIMEOUT_SECONDS,
          )
          info = rdb.info()
      except (RedisConnectionError, TypeError) as ex:
          log.error("Error making Redis connection: %s", ex.args)
          return {"status": DOWN}
      except RedisResponseError as ex:
          log.error("Bad Redis response: %s", ex.args)
          return {"status": DOWN, "message": "auth error"}
      micro = (datetime.now() - start).microseconds
      del rdb  # the redis package does not support Redis's QUIT.
      ret = {
          "status": UP, "response_microseconds": micro,
      }
      fields = ("uptime_in_seconds", "used_memory", "used_memory_peak")
      ret.update({x: info[x] for x in fields})
      return ret