B6 backend: probe notification engine — hub-faithful sweep (offline/recovery with flap discipline, traffic steps, expiry digest + auto-renewal, login), Telegram via the panel bot + webhook channel, notify settings/test/coverage API, login hook
This commit is contained in:
@@ -365,6 +365,19 @@ func (s *Server) startTask(restartXray bool, loc *time.Location) {
|
||||
job.NewProbeHistoryJob().Run()
|
||||
}()
|
||||
|
||||
// Probe notifications (item 7 B6): the connectivity/traffic sweep
|
||||
// every 30s (the hub's cadence — an offline alert trails its
|
||||
// grace period by at most one sweep), and the expiry
|
||||
// housekeeping hourly on the hour so a date rolls within seconds
|
||||
// of midnight, plus the same one-minute startup kick as above
|
||||
// (the hub runs its housekeeping immediately at boot).
|
||||
_, _ = s.cron.AddJob("@every 30s", job.NewProbeNotifyJob())
|
||||
_, _ = s.cron.AddJob("@hourly", job.NewProbeNotifyHousekeepingJob())
|
||||
go func() {
|
||||
time.Sleep(time.Minute)
|
||||
job.NewProbeNotifyHousekeepingJob().Run()
|
||||
}()
|
||||
|
||||
// check client ips from log file every day
|
||||
_, _ = s.cron.AddJob("@daily", job.NewClearLogsJob())
|
||||
_, _ = s.cron.AddJob(cadenceXrayLogPrune, job.NewPruneXrayLogsJob())
|
||||
|
||||
Reference in New Issue
Block a user