Merge pull request #213 from vmarmol/faster-start

Move the initial housekeeping tick to the housekeeping thread.
This commit is contained in:
Vish Kannan 2014-09-03 22:31:29 -07:00
commit 97b583f0cf

View File

@ -53,10 +53,6 @@ type containerData struct {
}
func (c *containerData) Start() error {
// Force the first update.
c.housekeepingTick()
glog.Infof("Start housekeeping for container %q\n", c.info.Name)
go c.housekeeping()
return nil
}
@ -114,6 +110,10 @@ func (c *containerData) housekeeping() {
longHousekeeping = *HousekeepingInterval / 2
}
// Force the first update.
c.housekeepingTick()
glog.Infof("Start housekeeping for container %q\n", c.info.Name)
// Housekeep every second.
ticker := time.NewTicker(*HousekeepingInterval)
defer ticker.Stop()