crawler.js 453 Bytes
/**
 * run
 * Created by lintry on 2020/1/28.
 */
const config = global.config;
const dbo = global.sequelize;
const DataImporter = require('../service/data_importer');
const data_importer = new DataImporter(dbo);
const NCOV_URL = config.NCOV.API_URL;
const Result = require('kml-express-stage-lib').Result;

module.exports = async (cfg) => {
    await data_importer.import_url(NCOV_URL, {latest: 0})
    return Result.Ok(`Fetched from ${NCOV_URL}`);
};