mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 19:35:41 +03:00
Renaming the SyncWithConsul method
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user