remove Score Historicals older than 30 days
parent
4ba63caf2e
commit
64d1224a36
|
@ -43,7 +43,12 @@ export default class Queue {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const clearOldHistoricalReportsJob = new cron.CronJob('0 20 * * *', async () => {
|
||||||
|
this.client.db.ScoreHistorical.remove({ date: { $lt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000) } });
|
||||||
|
});
|
||||||
|
|
||||||
historialCommunityReportJob.start();
|
historialCommunityReportJob.start();
|
||||||
|
clearOldHistoricalReportsJob.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async jobCounts() {
|
public async jobCounts() {
|
||||||
|
|
Loading…
Reference in New Issue