/** * Created by Julin on 2022/11/07. */ 'use strict'; const schedule = require('node-schedule'); const config = require('./config'); const logger = require('./lib/logger'); const clickhouse = require('./lib/dc/clickhouse'); const postgres = require('./lib/dc/postgres'); const statProcessNodes = require('./lib/statProcessNodes'); (function () { logger(config.logger); clickhouse(config.clickhouse); postgres(config.postgres); statProcessNodes(); process.logger.info('[FS-STATS]', 'started.'); // 每天 23:00 执行 const job = schedule.scheduleJob('0 0 23 * * ?', function () { statProcessNodes(); }); })();