This commit is contained in:
aozhiwei 2023-07-05 18:04:28 +08:00
parent e5de8ecccc
commit 3e206fbcde
2 changed files with 11 additions and 4 deletions

View File

@ -8,10 +8,17 @@ const LIMIT_COUNT = 100;
class PullDbEvent extends BaseService { class PullDbEvent extends BaseService {
static maxIdx = BigInt(0); static #maxIdx = BigInt(0);
static async staticInit() { static async staticInit() {
const {err, conn} = await app.getDbConn('BcEventDb0');
{
const {err, maxIdx} = await conn.getMaxIdx('');
if (err) {
throw 'PullDbEvent error:' + err;
}
PullDbEvent.#maxIdx = maxIdx;
}
} }
async init(net, event) { async init(net, event) {
@ -77,7 +84,7 @@ class PullDbEvent extends BaseService {
} }
getEndIdx() { getEndIdx() {
return maxIdx; return PullDbEvent.#maxIdx;
} }
getNetId() { getNetId() {

2
third_party/j7 vendored

@ -1 +1 @@
Subproject commit 46bf5c4dd5a23b3b01e23e3523b70c74132e4b46 Subproject commit 22eef8b27c64e0970dc96e96496b51bffc42c7c8