mirror of
https://github.com/prometheus/prometheus.git
synced 2025-07-03 11:03:25 +00:00
Fix a race in target.go.
Also, fix problems in shutdown. Starting serving and shutdown still has to be cleaned up properly. It's a mess. Change-Id: I51061db12064e434066446e6fceac32741c4f84c
This commit is contained in:
parent
fd6600850a
commit
4447708c9f
4 changed files with 32 additions and 22 deletions
4
main.go
4
main.go
|
@ -86,8 +86,6 @@ func (p *prometheus) interruptHandler() {
|
|||
glog.Warning("Received SIGINT/SIGTERM; Exiting gracefully...")
|
||||
|
||||
p.Close()
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
func (p *prometheus) Close() {
|
||||
|
@ -138,7 +136,6 @@ func main() {
|
|||
if err != nil {
|
||||
glog.Fatal("Error opening memory series storage: ", err)
|
||||
}
|
||||
defer memStorage.Close()
|
||||
registry.MustRegister(memStorage)
|
||||
|
||||
var remoteTSDBQueue *remote.TSDBQueueManager
|
||||
|
@ -220,7 +217,6 @@ func main() {
|
|||
storage: memStorage,
|
||||
remoteTSDBQueue: remoteTSDBQueue,
|
||||
}
|
||||
defer prometheus.Close()
|
||||
|
||||
webService := &web.WebService{
|
||||
StatusHandler: prometheusStatus,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue