Finish the clean expired deleted files feature.

This commit is contained in:
lishuang
2020-07-12 20:42:01 +08:00
parent 19cfd3daf4
commit a7bcc4d4fb
4 changed files with 97 additions and 21 deletions

View File

@ -27,11 +27,11 @@ func (this *TankLogger) Init() {
expression := "0 0 * * *"
cronJob := cron.New()
entryId, err := cronJob.AddFunc(expression, this.maintain)
_, err := cronJob.AddFunc(expression, this.maintain)
core.PanicError(err)
cronJob.Start()
this.Info("[cron job] Every day 00:00 maintain log file. entryId = %d", entryId)
this.Info("[cron job] Every day 00:00 maintain log file.")
}
func (this *TankLogger) Destroy() {