Chore: Add alert ctx (#41161)

* Add context for alert

* Remove context.TODO

* Remove xorm

* Remove context.TODO

* Fix UsageStatsQuerier interface
This commit is contained in:
idafurjes
2021-11-03 14:10:39 +01:00
committed by GitHub
parent 0997065e04
commit 9340430723
23 changed files with 198 additions and 186 deletions

View File

@@ -43,7 +43,7 @@ func (ac *OSSAccessControlService) IsDisabled() bool {
}
func (ac *OSSAccessControlService) registerUsageMetrics() {
ac.UsageStats.RegisterMetricsFunc(func() (map[string]interface{}, error) {
ac.UsageStats.RegisterMetricsFunc(func(context.Context) (map[string]interface{}, error) {
return map[string]interface{}{
"stats.oss.accesscontrol.enabled.count": ac.getUsageMetrics(),
}, nil