Since env variables aren't available at assets:precompile, don't try to connect to redis unless the env is set