configurable max blocks
parent
a044fcd168
commit
4aa89abea5
|
@ -29,6 +29,10 @@ public interface TileServerConfig extends Config {
|
|||
@DefaultValue("20")
|
||||
int tilerendererUpdateInterval();
|
||||
|
||||
@Key("tilerenderer.maxupdateblocks")
|
||||
@DefaultValue("500")
|
||||
int tilerendererUpdateMaxBlocks();
|
||||
|
||||
@Key("player.updateinterval")
|
||||
@DefaultValue("2")
|
||||
int playerUpdateInterval();
|
||||
|
|
|
@ -37,8 +37,11 @@ public class UpdateChangedTilesJob implements Runnable {
|
|||
this.eventBus = eventBus;
|
||||
|
||||
this.yCondition = BLOCKS.POSY.between(cfg.tilesMinY(), cfg.tilesMaxY());
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
private final TileServerConfig cfg;
|
||||
|
||||
private final EventBus eventBus;
|
||||
|
||||
private final DSLContext ctx, tileCtx;
|
||||
|
@ -84,7 +87,7 @@ public class UpdateChangedTilesJob implements Runnable {
|
|||
|
||||
try {
|
||||
running = true;
|
||||
final int LIMIT = 500;
|
||||
final int LIMIT = cfg.tilerendererUpdateMaxBlocks();
|
||||
|
||||
Result<BlocksRecord> blocks = ctx
|
||||
.selectFrom(BLOCKS)
|
||||
|
|
Loading…
Reference in New Issue