From e07e77b79daf42f6fb36e7b861c2cd6959dcd9ea Mon Sep 17 00:00:00 2001 From: Sean Chittenden Date: Mon, 23 May 2016 21:35:31 -0700 Subject: [PATCH] s/availble/runChecks/g --- client/consul/sync.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/consul/sync.go b/client/consul/sync.go index bfaa6d601..556de1b85 100644 --- a/client/consul/sync.go +++ b/client/consul/sync.go @@ -19,8 +19,8 @@ import ( // Syncer allows syncing of services and checks with Consul type Syncer struct { - client *consul.Client - availble bool + client *consul.Client + runChecks bool serviceIdentifier string // serviceIdentifier is a token which identifies which task/alloc the service belongs to delegateChecks map[string]struct{} // delegateChecks are the checks that the Nomad client runs and reports to Consul @@ -348,12 +348,12 @@ func (c *Syncer) Run() { select { case <-sync.C: if err := c.performSync(); err != nil { - if c.availble { + if c.runChecks { c.logger.Printf("[DEBUG] consul: error in syncing services for %q: %v", c.serviceIdentifier, err) } - c.availble = false + c.runChecks = false } else { - c.availble = true + c.runChecks = true } case <-c.shutdownCh: sync.Stop() @@ -447,11 +447,11 @@ func (c *Syncer) runCheck(check Check) { output = res.Err.Error() } if err := c.client.Agent().UpdateTTL(check.ID(), output, state); err != nil { - if c.availble { + if c.runChecks { c.logger.Printf("[DEBUG] consul.sync: error updating ttl check for check %q: %v", check.ID(), err) - c.availble = false + c.runChecks = false } else { - c.availble = true + c.runChecks = true } } }