use GlobalContext whenever possible (#9280)

This change is throughout the codebase to
ensure that all codepaths honor GlobalContext
This commit is contained in:
Harshavardhana
2020-04-09 09:30:02 -07:00
committed by GitHub
parent 1b45be0d60
commit f44cfb2863
76 changed files with 374 additions and 409 deletions

View File

@@ -17,7 +17,6 @@
package cmd
import (
"context"
"errors"
"net/http"
"time"
@@ -164,6 +163,6 @@ func webRequestAuthenticate(req *http.Request) (*xjwt.MapClaims, bool, error) {
func newAuthToken(audience string) string {
cred := globalActiveCred
token, err := authenticateNode(cred.AccessKey, cred.SecretKey, audience)
logger.CriticalIf(context.Background(), err)
logger.CriticalIf(GlobalContext, err)
return token
}