initial commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package cronjob
|
||||
|
||||
import (
|
||||
"s-ui/logger"
|
||||
"s-ui/service"
|
||||
)
|
||||
|
||||
type StatsJob struct {
|
||||
service.SingBoxService
|
||||
}
|
||||
|
||||
func NewStatsJob() *StatsJob {
|
||||
return new(StatsJob)
|
||||
}
|
||||
|
||||
func (s *StatsJob) Run() {
|
||||
err := s.SingBoxService.GetStats()
|
||||
if err != nil {
|
||||
logger.Warning("Get stats failed: ", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user