1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-07-04 12:03:41 +02:00

cmd/thalos/main.go: Make telegram notifications optional

This commit is contained in:
Henrik Hautakoski 2023-07-18 10:20:55 +02:00
parent b04a03ae87
commit e1dc5f85a0

View file

@ -225,6 +225,8 @@ func main() {
} }
// Init telegram notification service // Init telegram notification service
if len(conf.Telegram.Id) > 0 {
telegram, err := telegram.New(conf.Telegram.Id) telegram, err := telegram.New(conf.Telegram.Id)
if err != nil { if err != nil {
log.WithError(err).Fatal("Failed to initialize telegram") log.WithError(err).Fatal("Failed to initialize telegram")
@ -235,6 +237,7 @@ func main() {
// Register services in notification manager // Register services in notification manager
notify.UseServices(telegram) notify.UseServices(telegram)
}
// Connect to redis // Connect to redis
rdb := redis.NewClient(&redis.Options{ rdb := redis.NewClient(&redis.Options{