refactor connecting to redis for scheduler so it works in heroku as well