performance improvement
parent
a11fc2cd5c
commit
438b4bee01
|
@ -65,8 +65,6 @@ func AddLog(body structs.LogBody) {
|
|||
}
|
||||
}
|
||||
|
||||
for clientId, sseClient := range cache.SSEClients {
|
||||
if sseClient.LogType == body.Type && sseClient.Date == date {
|
||||
marshaledLogs, err := json.Marshal(body.Logs)
|
||||
|
||||
if err != nil {
|
||||
|
@ -74,6 +72,8 @@ func AddLog(body structs.LogBody) {
|
|||
return
|
||||
}
|
||||
|
||||
for clientId, sseClient := range cache.SSEClients {
|
||||
if sseClient.LogType == body.Type && sseClient.Date == date {
|
||||
sseClient.MessageChannel <- structs.SSEClientChannelMessage{
|
||||
ClientId: clientId,
|
||||
Message: marshaledLogs,
|
||||
|
|
Loading…
Reference in New Issue