Renaming the SyncWithConsul method

This commit is contained in:
Diptanu Choudhury
2016-03-23 18:13:13 -07:00
parent 5918e99089
commit 5b652bcfd8
2 changed files with 3 additions and 3 deletions

View File

@@ -268,8 +268,8 @@ func (c *ConsulService) deregisterCheck(ID string) error {
return c.client.Agent().CheckDeregister(ID)
}
// SyncWithConsul triggers periodic syncing of services and checks with Consul
func (c *ConsulService) SyncWithConsul() {
// PeriodicSync triggers periodic syncing of services and checks with Consul
func (c *ConsulService) PeriodicSync() {
sync := time.After(syncInterval)
for {
select {

View File

@@ -359,7 +359,7 @@ func (e *UniversalExecutor) RegisterServices() error {
e.consulService = cs
}
err := e.consulService.SyncTask(e.ctx.Task)
go e.consulService.SyncWithConsul()
go e.consulService.PeriodicSync()
return err
}