constructor(config) { const jobs = [ { jobFunction: oldRefreshTokenRemoval_1.default, interval: config.tokens.refreshToken.removalCronjobInterval, description: "remove old expired refresh tokens" } ]; jobs.forEach(job => { createNewJob(job.jobFunction, job.interval, job.description).start(); }); }
private constructor(config: TypeConfig) { const jobs = [ { jobFunction: oldRefreshTokenRemoval, interval: config.tokens.refreshToken.removalCronjobInterval, description: "remove old expired refresh tokens" } ]; jobs.forEach(job => { createNewJob(job.jobFunction, job.interval, job.description).start(); }); }
/** * disconnect * @summary disconnect mongoOplog */ var disconnect = function (watcher, filePath, Oplog) { var getFileList = Util.readFileList(filePath, [], ".json"); _.find(getFileList, function (item) { logger.logMethod('error', watcher.elasticsearch.e_connection.e_server, watcher.elasticsearch.e_connection.e_index, "mongoOplog error: file is " + JSON.stringify(item.Content)); logger.logMethod('debug', watcher.elasticsearch.e_connection.e_server, watcher.elasticsearch.e_index, ' tailing stopped!'); }); Oplog.destroy(); var task = cron.schedule('0 59 * * * *', () => { tail(watcher, filePath, 0); }); task.destroy(); }
constructor(config) { const jobs = [ { jobFunction: oldRefreshTokenRemoval_1.default, interval: config.tokens.refreshToken.removalCronjobInterval, description: "remove old expired refresh tokens" } ]; jobs.forEach(job => { createNewJob(job.jobFunction, job.interval, job.description).start(); }); }
private constructor(config: TypeConfig) { const jobs = [ { jobFunction: oldRefreshTokenRemoval, interval: config.tokens.refreshToken.removalCronjobInterval, description: "remove old expired refresh tokens" } ]; jobs.forEach(job => { createNewJob(job.jobFunction, job.interval, job.description).start(); }); }