import logging


def run_flushdb(redis_con):
    """
        Purpose:
            Run Redis FlushDB Command. Will clear all
            keys and values from the Redis Database (good
            for clearing cache when redis is used as
            a caching solution)
        Args:
            redis_con (Redis StrictRedis): Connection
                to Redis database
        Return
            was_successful (bool): whether or not the
                command was successful running
    """
    logging.info("Flushing Redis DB")

    try:
        redis_con.flushdb()
    except Exception as err:
        logging.error("Error Flushing DB: {0}".format(err))
        return False

    return True