This commit is contained in:
aozhiwei 2023-07-10 20:33:25 +08:00
parent 9af75f978b
commit bb0ffedecd

View File

@ -7,6 +7,8 @@ const BaseService = require('./baseservice');
const metaFactory = require('../metadata/factory'); const metaFactory = require('../metadata/factory');
const eventsFactory = require('./events/factory'); const eventsFactory = require('./events/factory');
const LIMIT_COUNT = 100;
class DbEventProcess extends BaseService { class DbEventProcess extends BaseService {
static #tableMaxIdxHash = {}; static #tableMaxIdxHash = {};
@ -79,7 +81,7 @@ class DbEventProcess extends BaseService {
const {err, rows} = await this.conn.execQuery( const {err, rows} = await this.conn.execQuery(
'SELECT * FROM ${tableName} WHERE `idx` > ? AND `idx` <= ? ' + 'SELECT * FROM ${tableName} WHERE `idx` > ? AND `idx` <= ? ' +
'AND net_id = ? AND event_name = ? AND contract_address = ? AND ' + 'AND net_id = ? AND event_name = ? AND contract_address = ? AND ' +
'state = ' + constant.EVENTDB_STATE_PENDING + ' ' + 'status = ' + constant.EVENTDB_STATE_PENDING + ' ' +
'LIMIT ' + LIMIT_COUNT, 'LIMIT ' + LIMIT_COUNT,
[ [
startIdx.toString(), startIdx.toString(),