mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-09 10:43:44 +08:00
check if the api url in whitelist for mj plus client
This commit is contained in:
@@ -62,13 +62,8 @@ func (p *ServicePool) InitServices(plusConfigs []types.MjPlusConfig, proxyConfig
|
||||
if config.Enabled == false {
|
||||
continue
|
||||
}
|
||||
err := p.licenseService.IsValidApiURL(config.ApiURL)
|
||||
if err != nil {
|
||||
logger.Errorf("创建 MJ-PLUS 服务失败:%v", err)
|
||||
continue
|
||||
}
|
||||
|
||||
cli := NewPlusClient(config)
|
||||
cli := NewPlusClient(config, p.licenseService)
|
||||
name := fmt.Sprintf("mj-plus-service-%d", k)
|
||||
plusService := NewService(name, p.taskQueue, p.notifyQueue, p.db, cli)
|
||||
go func() {
|
||||
|
||||
Reference in New Issue
Block a user