public void finishZombieTasksWithError(){
  List<PollableTask> zombiePollableTasks;
  do {
    logger.debug("Fetching 5 zombie pollable tasks to clean up");
    PageRequest pageable=new PageRequest(0,5);
    zombiePollableTasks=pollableTaskRepository.findZombiePollableTasks(pageable);
    for (    PollableTask zombiePollableTask : zombiePollableTasks) {
      markAsFinishedWithError(zombiePollableTask);
    }
  }
 while (!zombiePollableTasks.isEmpty());
}

public void finishZombieTasksWithError ( ) { List < PollableTask > zombiePollableTasks ; do { logger . debug ( "Fetching 5 zombie pollable tasks to clean up" ) ; PageRequest pageable = new PageRequest ( 0 , 5 ) ; zombiePollableTasks = pollableTaskRepository . findZombiePollableTasks ( pageable ) ; for ( PollableTask zombiePollableTask : zombiePollableTasks ) { markAsFinishedWithError ( zombiePollableTask ) ; } } while ( ! zombiePollableTasks . isEmpty ( ) ) ; }
marks zombie tasks as finished with error . a zombie task can be defined as a task that did not complete before its given timeout period .
