mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-27 03:27:37 +01:00
Fix start-up & add debug to ProcessingQueue
This commit is contained in:
parent
dced471adb
commit
bff67cd1e5
@ -159,15 +159,6 @@ public class Plan extends BukkitPlugin<Plan> {
|
||||
}
|
||||
Benchmark.stop("Enable", "Init Database");
|
||||
|
||||
Benchmark.start("Init DataCache");
|
||||
infoManager = new InformationManager(this);
|
||||
Benchmark.stop("Enable", "Init DataCache");
|
||||
|
||||
registerListeners();
|
||||
this.api = new API(this);
|
||||
|
||||
registerTasks();
|
||||
|
||||
Benchmark.start("WebServer Initialization");
|
||||
uiServer = new WebServer(this);
|
||||
registerWebAPIs(); // TODO Move to WebServer class
|
||||
@ -177,10 +168,13 @@ public class Plan extends BukkitPlugin<Plan> {
|
||||
Log.error("WebServer was not successfully initialized.");
|
||||
}
|
||||
|
||||
//TODO Re-Enable after DB ServerTable has been initialized properly.
|
||||
// Benchmark.start("ServerInfo Registration");
|
||||
// serverInfoManager = new ServerInfoManager(this);
|
||||
// Benchmark.stop("Enable", "ServerInfo Registration");
|
||||
serverInfoManager = new ServerInfoManager(this);
|
||||
infoManager = new InformationManager(this);
|
||||
|
||||
registerListeners();
|
||||
registerTasks();
|
||||
|
||||
this.api = new API(this);
|
||||
|
||||
setupFilter(); // TODO Move to RegisterCommand Constructor
|
||||
|
||||
|
@ -96,7 +96,7 @@ public class PlanPlayerListener implements Listener {
|
||||
cache.cacheSession(uuid, Session.start(time, world, gm));
|
||||
|
||||
plugin.addToProcessQueue(
|
||||
new RegisterProcessor(this, uuid, player.getFirstPlayed(), playerName, playersOnline),
|
||||
new RegisterProcessor(uuid, player.getFirstPlayed(), playerName, playersOnline),
|
||||
new IPUpdateProcessor(uuid, ip),
|
||||
new NameProcessor(uuid, playerName, displayName),
|
||||
new DBCommitProcessor(plugin.getDB())
|
||||
|
@ -49,6 +49,7 @@ class ProcessConsumer extends Consumer<Processor> {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
Log.debug("Processed " + process.getClass().getSimpleName() + ".");
|
||||
process.process();
|
||||
} catch (Exception | NoClassDefFoundError | NoSuchFieldError | NoSuchMethodError e) {
|
||||
Log.toLog(this.getTaskName() + ":" + process.getClass().getSimpleName(), e);
|
||||
|
Loading…
Reference in New Issue
Block a user