fix: bucket / object count and size returned as 0 (#11825)

This commit is contained in:
Shireesh Anjal 2021-03-19 03:10:21 +05:30 committed by GitHub
parent 51a8619a79
commit be5910b87e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 13 deletions

View File

@ -256,18 +256,6 @@ func (adm *AdminClient) ServerHealthInfo(ctx context.Context, healthDataTypes []
var healthInfoMessage HealthInfo
healthInfoMessage.TimeStamp = time.Now()
if v.Get(string(HealthDataTypeMinioInfo)) == "true" {
info, err := adm.ServerInfo(ctx)
if err != nil {
respChan <- HealthInfo{
Error: err.Error(),
}
return
}
healthInfoMessage.Minio.Info = info
respChan <- healthInfoMessage
}
resp, err := adm.executeMethod(ctx, "GET", requestData{
relPath: adminAPIPrefix + "/healthinfo",
queryValues: v,
@ -308,10 +296,22 @@ func (adm *AdminClient) ServerHealthInfo(ctx context.Context, healthDataTypes []
}
respChan <- healthInfoMessage
if v.Get(string(HealthDataTypeMinioInfo)) == "true" {
info, err := adm.ServerInfo(ctx)
if err != nil {
respChan <- HealthInfo{
Error: err.Error(),
}
return
}
healthInfoMessage.Minio.Info = info
respChan <- healthInfoMessage
}
close(respChan)
}()
return respChan
}
// GetTotalCapacity gets the total capacity a server holds.