mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
use GlobalContext whenever possible (#9280)
This change is throughout the codebase to ensure that all codepaths honor GlobalContext
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/x509"
|
||||
"fmt"
|
||||
"net"
|
||||
@@ -55,7 +54,7 @@ func printStartupSafeModeMessage(apiEndpoints []string, err error) {
|
||||
// Object layer is initialized then print StorageInfo in safe mode.
|
||||
objAPI := newObjectLayerWithoutSafeModeFn()
|
||||
if objAPI != nil {
|
||||
if msg := getStorageInfoMsgSafeMode(objAPI.StorageInfo(context.Background(), false)); msg != "" {
|
||||
if msg := getStorageInfoMsgSafeMode(objAPI.StorageInfo(GlobalContext, false)); msg != "" {
|
||||
logStartupMessage(msg)
|
||||
}
|
||||
}
|
||||
@@ -111,13 +110,13 @@ func printStartupMessage(apiEndpoints []string) {
|
||||
// If cache layer is enabled, print cache capacity.
|
||||
cachedObjAPI := newCachedObjectLayerFn()
|
||||
if cachedObjAPI != nil {
|
||||
printCacheStorageInfo(cachedObjAPI.StorageInfo(context.Background()))
|
||||
printCacheStorageInfo(cachedObjAPI.StorageInfo(GlobalContext))
|
||||
}
|
||||
|
||||
// Object layer is initialized then print StorageInfo.
|
||||
objAPI := newObjectLayerFn()
|
||||
if objAPI != nil {
|
||||
printStorageInfo(objAPI.StorageInfo(context.Background(), false))
|
||||
printStorageInfo(objAPI.StorageInfo(GlobalContext, false))
|
||||
}
|
||||
|
||||
// Prints credential, region and browser access.
|
||||
|
||||
Reference in New Issue
Block a user