action = candidateActions.pollFirst();
if (action != null) {
workInProgressCandidateActions.put(requestingCrawler, action);
return action;
} else {
Crawler c = registeredCrawlers.pollFirst();
if (c == null) {
return null;
}
do {
if (manager.removeWorkFromQueue(c)) {