Skip to content

Commit

Permalink
fix: fix usage client nil issue when mgmt-backend not ready (#241)
Browse files Browse the repository at this point in the history
Because

- in case mgmt-backend is not ready, model-backend should not panic and crash

This commit

- fix the issue by breaking the usage report loop
  • Loading branch information
pinglin authored Feb 8, 2023
1 parent 1ecfe40 commit 4290159
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/usage/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func (u *usage) RetrieveUsageData() interface{} {
})
if err != nil {
logger.Error(fmt.Sprintf("[mgmt-backend: ListUser] %s", err))
break
}

// Roll all model resources on a user
Expand Down

0 comments on commit 4290159

Please sign in to comment.