examine: Move price lookups off executor
Historically price lookup was done by sending a web request on price
lookups, which required calls to be done on an executor. As of
a1ae397e11, client prices are loaded periodically and cached, thus no
longer imposing any thread requirement on price lookup.
This commit is contained in:
@@ -29,7 +29,6 @@ import com.google.common.cache.CacheBuilder;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Deque;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.inject.Inject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -92,9 +91,6 @@ public class ExaminePlugin extends Plugin
|
||||
@Inject
|
||||
private ChatMessageManager chatMessageManager;
|
||||
|
||||
@Inject
|
||||
private ScheduledExecutorService executor;
|
||||
|
||||
@Subscribe
|
||||
public void onGameStateChanged(GameStateChanged event)
|
||||
{
|
||||
@@ -219,7 +215,7 @@ public class ExaminePlugin extends Plugin
|
||||
if (itemComposition != null)
|
||||
{
|
||||
final int id = itemManager.canonicalize(itemComposition.getId());
|
||||
executor.submit(() -> getItemPrice(id, itemComposition, itemQuantity));
|
||||
getItemPrice(id, itemComposition, itemQuantity);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user