|
@ -62,7 +62,7 @@ public class OnlineUpdater extends BaseUpdater { |
|
|
|
|
|
|
|
|
public long getDifferentReplica() { |
|
|
public long getDifferentReplica() { |
|
|
Long rw = jdbcTemplate.query("SELECT COUNT(*) FROM `servers_online`", (rs, n) -> rs.getLong(1)).get(0); |
|
|
Long rw = jdbcTemplate.query("SELECT COUNT(*) FROM `servers_online`", (rs, n) -> rs.getLong(1)).get(0); |
|
|
Long ro = jdbcTemplate.query("SELECT COUNT(*) FROM `servers_online`", (rs, n) -> rs.getLong(1)).get(0); |
|
|
Long ro = jdbcTemplate_ro.query("SELECT COUNT(*) FROM `servers_online`", (rs, n) -> rs.getLong(1)).get(0); |
|
|
return Math.abs(rw - ro); |
|
|
return Math.abs(rw - ro); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|