separate frontend repository

This commit is contained in:
Alireza Ahmadi
2025-01-28 23:57:53 +01:00
parent f4b1b09362
commit 7faa28a89d
194 changed files with 48 additions and 19256 deletions
+26
View File
@@ -0,0 +1,26 @@
package cronjob
import (
"s-ui/logger"
"s-ui/service"
)
type DelStatsJob struct {
service.StatsService
trafficAge int
}
func NewDelStatsJob(ta int) *DelStatsJob {
return &DelStatsJob{
trafficAge: ta,
}
}
func (s *DelStatsJob) Run() {
err := s.StatsService.DelOldStats(s.trafficAge)
if err != nil {
logger.Warning("Deleting old statistics failed: ", err)
return
}
logger.Debug("Stats older than ", s.trafficAge, " days were deleted")
}