Merge pull request #213 from vmarmol/faster-start
Move the initial housekeeping tick to the housekeeping thread.
This commit is contained in:
commit
97b583f0cf
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user