mirror of
https://github.com/minio/minio.git
synced 2025-01-11 15:03:22 -05:00
check for update in background (#13889)
This commit is contained in:
parent
3e34e41a5a
commit
8144a125ce
@ -307,7 +307,7 @@ func checkUpdate(mode string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
logStartupMessage(prepareUpdateMessage("Run `mc admin update`", lrTime.Sub(crTime)))
|
logStartupMessage(prepareUpdateMessage("\nRun `mc admin update`", lrTime.Sub(crTime)))
|
||||||
}
|
}
|
||||||
|
|
||||||
func newConfigDirFromCtx(ctx *cli.Context, option string, getDefaultDir func() string) (*ConfigDir, bool) {
|
func newConfigDirFromCtx(ctx *cli.Context, option string, getDefaultDir func() string) (*ConfigDir, bool) {
|
||||||
|
@ -335,11 +335,13 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
|||||||
// - compression
|
// - compression
|
||||||
verifyObjectLayerFeatures("gateway "+gatewayName, newObject)
|
verifyObjectLayerFeatures("gateway "+gatewayName, newObject)
|
||||||
|
|
||||||
// Prints the formatted startup message once object layer is initialized.
|
// Check for updates in non-blocking manner.
|
||||||
if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled {
|
go func() {
|
||||||
// Check update mode.
|
if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled {
|
||||||
checkUpdate(globalMinioModeGatewayPrefix + gatewayName)
|
// Check for new updates from dl.min.io.
|
||||||
}
|
checkUpdate(getMinioMode())
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
if !globalCLIContext.Quiet {
|
if !globalCLIContext.Quiet {
|
||||||
// Print gateway startup message.
|
// Print gateway startup message.
|
||||||
|
@ -460,10 +460,13 @@ func serverMain(ctx *cli.Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled {
|
// Check for updates in non-blocking manner.
|
||||||
// Check for new updates from dl.min.io.
|
go func() {
|
||||||
checkUpdate(getMinioMode())
|
if !globalCLIContext.Quiet && !globalInplaceUpdateDisabled {
|
||||||
}
|
// Check for new updates from dl.min.io.
|
||||||
|
checkUpdate(getMinioMode())
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
if !globalActiveCred.IsValid() && globalIsDistErasure {
|
if !globalActiveCred.IsValid() && globalIsDistErasure {
|
||||||
globalActiveCred = auth.DefaultCredentials
|
globalActiveCred = auth.DefaultCredentials
|
||||||
|
Loading…
Reference in New Issue
Block a user