Merge pull request #15811 from gouqi11/addServerAbnormalNotify

fix(keystone): serviceAbnormal token fix
This commit is contained in:
Zexi Li
2023-01-17 10:46:37 +08:00
committed by GitHub
+2 -2
View File
@@ -76,8 +76,8 @@ func StartService() {
app := common_app.InitApp(&opts.BaseOptions, true).
OnException(func(method, path string, body jsonutils.JSONObject, err error) {
ctx := context.Background()
session := auth.GetAdminSession(ctx, opts.Region)
notifyclient.EventNotifyServiceAbnormal(ctx, session.GetToken(), consts.GetServiceType(), method, path, body, err)
token := tokens.GetDefaultAdminCredToken()
notifyclient.EventNotifyServiceAbnormal(ctx, token, consts.GetServiceType(), method, path, body, err)
})
cloudcommon.InitDB(&opts.DBOptions)