1
This commit is contained in:
parent
2239caab1b
commit
2044a2d2b4
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user