mirror of
https://github.com/pgsty/minio.git
synced 2026-07-21 13:10:22 +03:00
info: Initialize boot time early so uptime will always be correct (#9154)
This commit is contained in:
+1
-4
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* MinIO Cloud Storage, (C) 2017, 2018 MinIO, Inc.
|
* MinIO Cloud Storage, (C) 2017-2020 MinIO, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -309,8 +309,5 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
|
|||||||
printGatewayStartupMessage(getAPIEndpoints(), gatewayName)
|
printGatewayStartupMessage(getAPIEndpoints(), gatewayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set uptime time after object layer has initialized.
|
|
||||||
globalBootTime = UTCNow()
|
|
||||||
|
|
||||||
handleSignals()
|
handleSignals()
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -188,8 +188,8 @@ var (
|
|||||||
// Global HTTP request statisitics
|
// Global HTTP request statisitics
|
||||||
globalHTTPStats = newHTTPStats()
|
globalHTTPStats = newHTTPStats()
|
||||||
|
|
||||||
// Time when object layer was initialized on start up.
|
// Time when the server is started
|
||||||
globalBootTime time.Time
|
globalBootTime = UTCNow()
|
||||||
|
|
||||||
globalActiveCred auth.Credentials
|
globalActiveCred auth.Credentials
|
||||||
|
|
||||||
|
|||||||
@@ -441,9 +441,6 @@ func serverMain(ctx *cli.Context) {
|
|||||||
logger.StartupMessage(color.RedBold(msg))
|
logger.StartupMessage(color.RedBold(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set uptime time after object layer has initialized.
|
|
||||||
globalBootTime = UTCNow()
|
|
||||||
|
|
||||||
handleSignals()
|
handleSignals()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user