forked from LogBlock/LogBlock
Raised queue overloaded warning threshold
This commit is contained in:
@@ -152,9 +152,7 @@ public class Consumer extends TimerTask implements Runnable
|
|||||||
playerName = playerName.substring(0, 32);
|
playerName = playerName.substring(0, 32);
|
||||||
if (signtext != null)
|
if (signtext != null)
|
||||||
signtext = signtext.replace("\\", "\\\\").replace("'", "\\'");
|
signtext = signtext.replace("\\", "\\\\").replace("'", "\\'");
|
||||||
final BlockRow row = new BlockRow(loc.getWorld().getName().hashCode(), playerName, typeBefore, typeAfter, data, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), signtext, ca);
|
bqueue.add(new BlockRow(loc.getWorld().getName().hashCode(), playerName, typeBefore, typeAfter, data, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), signtext, ca));
|
||||||
if (!bqueue.offer(row))
|
|
||||||
log.info("[LogBlock] Failed to queue block for " + playerName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -209,8 +207,8 @@ public class Consumer extends TimerTask implements Runnable
|
|||||||
Statement state = null;
|
Statement state = null;
|
||||||
BlockRow b; KillRow k; String table;
|
BlockRow b; KillRow k; String table;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
if (bqueue.size() > 100)
|
if (getQueueSize() > 1000)
|
||||||
log.info("[LogBlock Consumer] Queue overloaded. Size: " + bqueue.size());
|
log.info("[LogBlock Consumer] Queue overloaded. Size: " + getQueueSize());
|
||||||
try {
|
try {
|
||||||
conn.setAutoCommit(false);
|
conn.setAutoCommit(false);
|
||||||
state = conn.createStatement();
|
state = conn.createStatement();
|
||||||
|
Reference in New Issue
Block a user