added conditional to redis initializer for env vars