diff --git a/web/job/check_client_ip_job.go b/web/job/check_client_ip_job.go index 163e3eba..9e988ce2 100644 --- a/web/job/check_client_ip_job.go +++ b/web/job/check_client_ip_job.go @@ -12,7 +12,6 @@ import ( "sort" "strings" - "time" ) type CheckClientIpJob struct { @@ -105,7 +104,6 @@ func processLogFile() { checkError(err) } } - time.Sleep(30 * time.Second) } func GetAccessLogPath() string { diff --git a/web/web.go b/web/web.go index 3d8f0242..cea0e911 100644 --- a/web/web.go +++ b/web/web.go @@ -251,7 +251,7 @@ func (s *Server) startTask() { s.cron.AddJob("@every 30s", job.NewCheckInboundJob()) // check client ips from log file every 10 sec - s.cron.AddJob("@every 10s", job.NewCheckClientIpJob()) + s.cron.AddJob("@every 30s", job.NewCheckClientIpJob()) // Make a traffic condition every day, 8:30 var entry cron.EntryID