This commit is contained in:
Daniel 2024-04-24 20:10:08 +08:00
parent ffb44137f2
commit d9351213da
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
11 changed files with 21 additions and 21 deletions

View file

@ -30,6 +30,6 @@ func NeedWarnDiskUsage(dataSize int64) bool {
logging.LogErrorf("get disk usage failed: %s", err)
return false
}
logging.LogInfof("disk usage [total=%s, used=%s, free=%s]", humanize.Bytes(usage.Total), humanize.Bytes(usage.Used), humanize.Bytes(usage.Free))
logging.LogInfof("disk usage [total=%s, used=%s, free=%s]", humanize.BytesCustomCeil(usage.Total, 2), humanize.BytesCustomCeil(usage.Used, 2), humanize.BytesCustomCeil(usage.Free, 2))
return usage.Free < uint64(dataSize*2)
}