1
This commit is contained in:
parent
a929459db1
commit
aa3863aeec
@ -43,6 +43,7 @@ class PullDbEvent extends BaseService {
|
||||
this.eventConf = this.event['eventConf'];
|
||||
this.progInfo = this.event['progressInfo'];
|
||||
this.contractAddress = this.net.getContractAddressByName(this.getContractName());
|
||||
this.progInfo['lastIdx'] = this.lastIdx.toString();
|
||||
await this.start();
|
||||
}
|
||||
|
||||
@ -199,6 +200,10 @@ class PullDbEvent extends BaseService {
|
||||
}
|
||||
}
|
||||
|
||||
getMaxIdx() {
|
||||
return PullDbEvent.#maxIdx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = PullDbEvent;
|
||||
|
@ -27,7 +27,9 @@ class DbSpider extends BaseTask {
|
||||
'eventConf': eventConf,
|
||||
'progressInfo': {
|
||||
'pullCount': 0,
|
||||
'eventCount': 0
|
||||
'eventCount': 0,
|
||||
'lastIdx': 0,
|
||||
'maxIdx': 0
|
||||
}
|
||||
};
|
||||
events.push(event);
|
||||
@ -59,11 +61,14 @@ class DbSpider extends BaseTask {
|
||||
(event) => {
|
||||
const eventConf = event['eventConf'];
|
||||
const progInfo = event['progressInfo'];
|
||||
const pullService = event['pullDbEventService'];
|
||||
const logObj = 'net_id: ' + net['net_id'] + ' ' +
|
||||
eventConf['contract_name'] + '.' +
|
||||
eventConf['event_name'] + ' ' +
|
||||
' pullCount:' + progInfo['pullCount'] +
|
||||
' eventCount:' + progInfo['eventCount'] +
|
||||
' lastIdx:' + progInfo['lastIdx'] +
|
||||
' maxIdx:' + pullService.getMaxIdx().toString() +
|
||||
'';
|
||||
log.info(logObj);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user