Added db connection fix for resque workers