feat: batch set server config (#983)

* feat: batch set server config

* run in parallel

* fix route

* fix

* return some information

* fix order
This commit is contained in:
UUBulb
2025-02-04 11:25:49 +08:00
committed by GitHub
parent 29d716b935
commit a41f623dd2
6 changed files with 69 additions and 37 deletions

View File

@@ -44,9 +44,9 @@ func (s *NezhaHandler) RequestTask(stream pb.NezhaService_RequestTaskServer) err
return err
}
singleton.ServerLock.RLock()
singleton.ServerLock.Lock()
singleton.ServerList[clientID].TaskStream = stream
singleton.ServerLock.RUnlock()
singleton.ServerLock.Unlock()
var result *pb.TaskResult
for {

View File

@@ -270,7 +270,7 @@ func SendNotification(notificationGroupID uint64, desc string, muteLabel *string
if err := ns.Send(desc); err != nil {
log.Printf("NEZHA>> Sending notification to %s failed: %v", n.Name, err)
} else {
log.Printf("NEZHA>> Sending notification to %s succeed", n.Name)
log.Printf("NEZHA>> Sending notification to %s succeeded", n.Name)
}
}
}