This commit is contained in:
aozhiwei 2023-07-05 18:57:32 +08:00
parent 3e206fbcde
commit f4a5b444c2

View File

@ -19,6 +19,17 @@ class PullDbEvent extends BaseService {
} }
PullDbEvent.#maxIdx = maxIdx; PullDbEvent.#maxIdx = maxIdx;
} }
async () => {
while (true) {
const {err, maxIdx} = await conn.getMaxIdx('');
if (!err) {
PullDbEvent.#maxIdx = maxIdx;
await utils.sleep(500 + utils.randRange(500, 1500));
} else {
await utils.sleep(5000 + utils.randRange(500, 1500));
}
}
}();
} }
async init(net, event) { async init(net, event) {