Chore: remove unused ticker
This commit is contained in:
11
bot.go
11
bot.go
@@ -841,15 +841,6 @@ func updateModelLists() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateModelListsTicker() {
|
|
||||||
updateModelLists() // run on the start
|
|
||||||
ticker := time.NewTicker(time.Minute * 1)
|
|
||||||
for {
|
|
||||||
<-ticker.C
|
|
||||||
updateModelLists()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
var err error
|
var err error
|
||||||
cfg, err = config.LoadConfig("config.toml")
|
cfg, err = config.LoadConfig("config.toml")
|
||||||
@@ -910,5 +901,5 @@ func init() {
|
|||||||
if cfg.STT_ENABLED {
|
if cfg.STT_ENABLED {
|
||||||
asr = extra.NewSTT(logger, cfg)
|
asr = extra.NewSTT(logger, cfg)
|
||||||
}
|
}
|
||||||
go updateModelListsTicker()
|
go updateModelLists()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,9 +140,7 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
|||||||
}
|
}
|
||||||
return LocalModels
|
return LocalModels
|
||||||
}
|
}
|
||||||
|
|
||||||
var modelRowIndex int // will be set before model row is added
|
var modelRowIndex int // will be set before model row is added
|
||||||
|
|
||||||
// Prepare API links dropdown - insert current API at the beginning
|
// Prepare API links dropdown - insert current API at the beginning
|
||||||
apiLinks := slices.Insert(cfg.ApiLinks, 0, cfg.CurrentAPI)
|
apiLinks := slices.Insert(cfg.ApiLinks, 0, cfg.CurrentAPI)
|
||||||
addListPopupRow("Select an api", apiLinks, cfg.CurrentAPI, func(option string) {
|
addListPopupRow("Select an api", apiLinks, cfg.CurrentAPI, func(option string) {
|
||||||
@@ -169,7 +167,6 @@ func makePropsTable(props map[string]float32) *tview.Table {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Prepare model list dropdown
|
// Prepare model list dropdown
|
||||||
modelRowIndex = row
|
modelRowIndex = row
|
||||||
modelCellID = fmt.Sprintf("listpopup_%d", modelRowIndex)
|
modelCellID = fmt.Sprintf("listpopup_%d", modelRowIndex)
|
||||||
|
|||||||
Reference in New Issue
Block a user