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:
parent
b04a03ae87
commit
e1dc5f85a0
1 changed files with 12 additions and 9 deletions
|
|
@ -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{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue