run.js
620 Bytes
const MODULE_NAME = 'PULL.RUN';
const logger = require('tektrans-logger');
const config = require('../config');
const getInquiry = require('./get-inquiry');
const getPrepaid = require('./get-prepaid');
const getPayment = require('./get-payment');
/**
* Run pulling schedule
*/
module.exports = async () => {
logger.verbose(`${MODULE_NAME} 34022A49: Run pulling schedule`, {
interval: config.pull_interval_ms,
});
setInterval(() => {
logger.verbose(`${MODULE_NAME} 06B8C652: Pull run`);
getPrepaid();
getInquiry();
getPayment();
}, config.pull_interval_ms);
};