get redis connection based on environment