feat: enhance sentinel and add button support for telegram

This commit is contained in:
root
2026-02-14 17:00:21 +00:00
parent 1ac0fb123b
commit 4ed24b57e3
4 changed files with 63 additions and 4 deletions

View File

@@ -714,6 +714,7 @@ func gatewayCmd() {
fmt.Printf("Error initializing gateway runtime: %v\n", err)
os.Exit(1)
}
sentinelService.SetManager(channelManager)
pidFile := filepath.Join(filepath.Dir(getConfigPath()), "gateway.pid")
if err := os.WriteFile(pidFile, []byte(fmt.Sprintf("%d\n", os.Getpid())), 0644); err != nil {
@@ -797,6 +798,7 @@ func gatewayCmd() {
},
)
if newCfg.Sentinel.Enabled {
sentinelService.SetManager(channelManager)
sentinelService.Start()
}
cfg = newCfg
@@ -835,6 +837,7 @@ func gatewayCmd() {
if newCfg.Sentinel.Enabled {
sentinelService.Start()
}
sentinelService.SetManager(channelManager)
if err := channelManager.StartAll(ctx); err != nil {
fmt.Printf("✗ Reload failed (start channels): %v\n", err)