add connection check to resque workers