mirror of
https://github.com/newnius/YAO-scheduler.git
synced 2025-12-13 07:46:43 +00:00
bugfix
This commit is contained in:
@@ -54,15 +54,15 @@ func (collector *Collector) init(conf Configuration) {
|
|||||||
go func(sarama.PartitionConsumer) {
|
go func(sarama.PartitionConsumer) {
|
||||||
defer collector.wg.Done()
|
defer collector.wg.Done()
|
||||||
for msg := range pc.Messages() {
|
for msg := range pc.Messages() {
|
||||||
var nodeStatus NodeStatus
|
go func(msg *sarama.ConsumerMessage) {
|
||||||
err = json.Unmarshal([]byte(string(msg.Value)), &nodeStatus)
|
var nodeStatus NodeStatus
|
||||||
if err != nil {
|
err = json.Unmarshal([]byte(string(msg.Value)), &nodeStatus)
|
||||||
log.Warn(err)
|
if err != nil {
|
||||||
continue
|
log.Warn(err)
|
||||||
}
|
return
|
||||||
go func(node NodeStatus) {
|
}
|
||||||
InstanceOfResourcePool().update(node)
|
InstanceOfResourcePool().update(nodeStatus)
|
||||||
}(nodeStatus)
|
}(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
}(pc)
|
}(pc)
|
||||||
|
|||||||
Reference in New Issue
Block a user