This commit is contained in:
aozhiwei 2023-07-10 15:00:16 +08:00
parent 2239caab1b
commit 2044a2d2b4

View File

@ -15,6 +15,7 @@ class Erc721Refresher extends BaseService {
this.bc = bc;
this.net = net;
this.refresher = refresher;
this.lastIdx = BigInt(0);
this.conf = this.refresher['conf'];
this.progInfo = this.refresher['progressInfo'];
await this.start();
@ -31,7 +32,7 @@ class Erc721Refresher extends BaseService {
const logHead = this.genLogHead('pullEvent ');
try {
const {err, rows} = await this.conn.execQuery(
'SELECT * FROM t_erc721_refresh WHERE ' +
'SELECT * FROM t_erc721_refresh WHERE idx > ' + this.lastIdx.toString() + ' ' +
'AND net_id = ? AND contract_address = ? AND status = 0 ' +
'LIMIT ' + LIMIT_COUNT,
[
@ -48,6 +49,8 @@ class Erc721Refresher extends BaseService {
await this.refresh(row);
}
);
} else {
this.lastIdx = BigInt(0);
}
} catch (err) {
log.error(logHead + err);