mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-11-12 12:13:46 +08:00
refactor: use waterflow component in mj, sd and dall image drawing page
This commit is contained in:
@@ -31,7 +31,7 @@ type ServicePool struct {
|
||||
db *gorm.DB
|
||||
uploaderManager *oss.UploaderManager
|
||||
Clients *types.LMap[uint, *types.WsClient] // UserId => Client
|
||||
licenseService *service.LicenseService
|
||||
licenseService *service.LicenseService
|
||||
}
|
||||
|
||||
var logger = logger2.GetLogger()
|
||||
@@ -56,6 +56,7 @@ func (p *ServicePool) InitServices(plusConfigs []types.MjPlusConfig, proxyConfig
|
||||
for _, s := range p.services {
|
||||
s.Stop()
|
||||
}
|
||||
p.services = make([]*Service, 0)
|
||||
|
||||
for k, config := range plusConfigs {
|
||||
if config.Enabled == false {
|
||||
|
||||
@@ -28,7 +28,7 @@ type Service struct {
|
||||
taskQueue *store.RedisQueue
|
||||
notifyQueue *store.RedisQueue
|
||||
db *gorm.DB
|
||||
running bool
|
||||
running bool
|
||||
}
|
||||
|
||||
func NewService(name string, taskQueue *store.RedisQueue, notifyQueue *store.RedisQueue, db *gorm.DB, cli Client) *Service {
|
||||
@@ -38,7 +38,7 @@ func NewService(name string, taskQueue *store.RedisQueue, notifyQueue *store.Red
|
||||
taskQueue: taskQueue,
|
||||
notifyQueue: notifyQueue,
|
||||
Client: cli,
|
||||
running: true,
|
||||
running: true,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,6 @@ func (s *Service) Run() {
|
||||
|
||||
func (s *Service) Stop() {
|
||||
s.running = false
|
||||
s.Client = nil
|
||||
}
|
||||
|
||||
type CBReq struct {
|
||||
|
||||
Reference in New Issue
Block a user