import { BlockChain } from 'chain/BlockChain' import { singleton } from 'decorators/singleton' import * as schedule from 'node-schedule' @singleton export default class BlocknumSchedule { parseAllRecord() { new BlockChain().updateCurrenBlockNum() } scheduleAll() { const job = schedule.scheduleJob('*/5 * * * * *', async () => { await this.parseAllRecord() }) } }