feat: add panic recovery and retry mechanism for InitChannelCache; improve batch deletion of abilities in FixAbility

This commit is contained in:
CaIon
2025-05-23 01:26:52 +08:00
parent 9a59da16a5
commit c53a48cde5
4 changed files with 68 additions and 16 deletions

View File

@@ -46,6 +46,17 @@ func (channel *Channel) GetModels() []string {
return strings.Split(strings.Trim(channel.Models, ","), ",")
}
func (channel *Channel) GetGroups() []string {
if channel.Group == "" {
return []string{}
}
groups := strings.Split(strings.Trim(channel.Group, ","), ",")
for i, group := range groups {
groups[i] = strings.TrimSpace(group)
}
return groups
}
func (channel *Channel) GetOtherInfo() map[string]interface{} {
otherInfo := make(map[string]interface{})
if channel.OtherInfo != "" {