mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
Update index add cron to testing cash in
This commit is contained in:
@@ -109,5 +109,25 @@ if (process.env.NODE_ENV.toUpperCase() == "PRODUCTION") {
|
||||
}
|
||||
});
|
||||
}
|
||||
// cash in
|
||||
const {
|
||||
_generateCashIn,
|
||||
} = require("../application/modules/cashin/cahsin.controller");
|
||||
|
||||
cron.schedule('* * * * *', async () => {
|
||||
try {
|
||||
let uniqueCode = helper.getUniqueCode();
|
||||
winston.logger.info(`STARTING SCHEDULER-FB70 GENERATE CASH IN ${uniqueCode}`);
|
||||
const posting = await _generateCashIn(uniqueCode);
|
||||
winston.logger.info(
|
||||
`END SCHEDULER-FB70 GENERATE CASH IN : ${JSON.stringify(posting)}`
|
||||
);
|
||||
} catch (error) {
|
||||
// create log
|
||||
winston.logger.error(
|
||||
`500 internal server error - backend server | ${error.message}`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = app;
|
||||
|
||||
Reference in New Issue
Block a user