From ceee1e4277953b68aeded8af01cf2eddfee2fbd5 Mon Sep 17 00:00:00 2001 From: somebodywashere <68244480+somebodywashere@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:07:56 +0300 Subject: Major changes to tgbot, also small changes for panel (#1463) * Reduce outage time on Xray errors * Improved logs clearing, added previous logs File name change: 3xipl-access-persistent.log -> 3xipl-ap.log All previous logs have .prev suffix * Preparations for tgbot additions * [tgbot] Improvements, Additions and Fixes * Changed interaction with Expire Date for Clients * Added more info and interactions with Online Clients * Added a way to get Ban Logs (also added them to backup) * Few fixes and optimizations in code * Fixed RU translation * [tgbot] More updates and fixes * [tgbot] Quick Fix * [tgbot] Quick Fix 2 * [tgbot] Big Updates Added Notifications for Clients throught Tgbot (when Expire) Added compability for Usernames both w/wo @ Added more buttons overall for admins * [tgbot] Fixes * [tbot] Fixes 2 * [tgbot] Removed usernames support for Notifications to work * [tgbot] Fix * [tgbot] Fix Notify * [tgbot] small fixes * [tgbot] replyMarkup only for last message on big messages * [tgbot] Fixed last message is empty * [tgbot] Fix messages split --- web/web.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'web/web.go') diff --git a/web/web.go b/web/web.go index 51b7603c..1bb6e235 100644 --- a/web/web.go +++ b/web/web.go @@ -240,11 +240,11 @@ func (s *Server) startTask() { if err != nil { logger.Warning("start xray failed:", err) } - // Check whether xray is running every 30 seconds - s.cron.AddJob("@every 30s", job.NewCheckXrayRunningJob()) + // Check whether xray is running every second + s.cron.AddJob("@every 1s", job.NewCheckXrayRunningJob()) - // Check if xray needs to be restarted - s.cron.AddFunc("@every 10s", func() { + // Check if xray needs to be restarted every 30 seconds + s.cron.AddFunc("@every 30s", func() { if s.xrayService.IsNeedRestartAndSetFalse() { err := s.xrayService.RestartXray(false) if err != nil { -- cgit v1.2.3