fix: improve metrics collection loop
by adding the context from main and make auth.GetAdminContext accepting a context we are now able to stop the metrics collection loop once the context is canceled Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
1d8d9459eb
commit
97f172eb51
8 changed files with 56 additions and 50 deletions
|
|
@ -37,7 +37,7 @@ import (
|
|||
)
|
||||
|
||||
func NewAPIController(r *runner.Runner, authenticator *auth.Authenticator, hub *wsWriter.Hub) (*APIController, error) {
|
||||
controllerInfo, err := r.GetControllerInfo(auth.GetAdminContext())
|
||||
controllerInfo, err := r.GetControllerInfo(auth.GetAdminContext(nil))
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "failed to get controller info")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue