readLastUpdateTime() {
        this.logger.info('Reading last price update time');
        let lastUpdate = 0;
        if (fs.existsSync(LAST_UPDATE_INFO_FILE))
            lastUpdate = parseInt(fs.readFileSync(LAST_UPDATE_INFO_FILE, 'utf-8'), 10);
        else
            fs.writeFileSync(LAST_UPDATE_INFO_FILE, String(lastUpdate), 'utf-8');
        this.lastUpdate = lastUpdate;
        if (this.lastUpdate === 0)
            this.logger.info('No price update information found');
        else
            this.logger.info(`Last updated price database on ${new Date(this.lastUpdate).toISOString()}`);
    }
/**
     * Loads last update timestamp from file.
     */
Loads last update timestamp from file.
Loads last update timestamp from file .
readLastUpdateTime() {
        this.logger.info('Reading last price update time');
        let lastUpdate = 0;
        if (fs.existsSync(LAST_UPDATE_INFO_FILE))
            lastUpdate = parseInt(fs.readFileSync(LAST_UPDATE_INFO_FILE, 'utf-8'), 10);
        else
            fs.writeFileSync(LAST_UPDATE_INFO_FILE, String(lastUpdate), 'utf-8');
        this.lastUpdate = lastUpdate;
        if (this.lastUpdate === 0)
            this.logger.info('No price update information found');
        else
            this.logger.info(`Last updated price database on ${new Date(this.lastUpdate).toISOString()}`);
    }
readLastUpdateTime ( ) { this . logger . info ( 'Reading last price update time' ) ; let lastUpdate = 0 ; if ( fs . existsSync ( LAST_UPDATE_INFO_FILE ) ) lastUpdate = parseInt ( fs . readFileSync ( LAST_UPDATE_INFO_FILE , 'utf-8' ) , 10 ) ; else fs . writeFileSync ( LAST_UPDATE_INFO_FILE , String ( lastUpdate ) , 'utf-8' ) ; this . lastUpdate = lastUpdate ; if ( this . lastUpdate === 0 ) this . logger . info ( 'No price update information found' ) ; else this . logger . info ( ` ${ new Date ( this . lastUpdate ) . toISOString ( ) } ` ) ; }
Loads last update timestamp from file.
Loads last update timestamp from file .