mirror of
https://github.com/minio/minio.git
synced 2025-11-24 19:46:16 -05:00
admin: Add Background heal status info API (#7774)
This API returns the information related to the self healing routine. For the moment, it returns: - The total number of objects that are scanned - The last time when an item was scanned
This commit is contained in:
@@ -60,6 +60,18 @@ func newBgHealSequence(numDisks int) *healSequence {
|
||||
}
|
||||
}
|
||||
|
||||
func getLocalBackgroundHealStatus() madmin.BgHealState {
|
||||
backgroundSequence, ok := globalSweepHealState.getHealSequenceByToken(bgHealingUUID)
|
||||
if !ok {
|
||||
return madmin.BgHealState{}
|
||||
}
|
||||
|
||||
return madmin.BgHealState{
|
||||
ScannedItemsCount: backgroundSequence.scannedItemsCount,
|
||||
LastHealActivity: backgroundSequence.lastHealActivity,
|
||||
}
|
||||
}
|
||||
|
||||
func initDailyHeal() {
|
||||
go startDailyHeal()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user