Store last delay, so if a search takes a long time, it does not bog the server down.
This commit is contained in:
parent
949ec511b7
commit
1c866e304e
3 changed files with 11 additions and 3 deletions
|
@ -70,8 +70,9 @@ public class RandomPositionLocator extends Task
|
|||
}else {
|
||||
// Schedule the task to execute
|
||||
//run();
|
||||
RandomPositionLocator next = new RandomPositionLocator(contain);
|
||||
DelayedExecutorService.getInstance().schedule(next, 1);
|
||||
|
||||
RandomPositionLocator next = new RandomPositionLocator(contain.withThreadDelay(contain.lastThreadDelay+1));
|
||||
DelayedExecutorService.getInstance().schedule(next, contain.lastThreadDelay+1);
|
||||
AriasEssentials.LOGGER.info("Giving up current RTP search. Scheduling another search in 1 second");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue