move redis connection to config