Changed a log line

This commit is contained in:
Diptanu Choudhury
2016-03-23 19:20:08 -07:00
parent c8622d8547
commit 4a2bc83c14
2 changed files with 7 additions and 5 deletions

View File

@@ -275,7 +275,8 @@ func (c *ConsulService) deregisterCheck(ID string) error {
return c.client.Agent().CheckDeregister(ID)
}
// PeriodicSync triggers periodic syncing of services and checks with Consul
// PeriodicSync triggers periodic syncing of services and checks with Consul.
// This is a long lived go-routine which is stopped during shutdown
func (c *ConsulService) PeriodicSync() {
sync := time.After(syncInterval)
for {

View File

@@ -266,12 +266,13 @@ func (e *UniversalExecutor) UpdateTask(task *structs.Task) error {
e.lre.MaxFiles = task.LogConfig.MaxFiles
e.lre.FileSize = fileSize
var err error
// Re-syncing task with consul service
if e.consulService != nil {
err = e.consulService.SyncTask(task)
if err := e.consulService.SyncTask(task); err != nil {
return err
}
}
return err
return nil
}
func (e *UniversalExecutor) wait() {
@@ -365,7 +366,7 @@ func (e *UniversalExecutor) RegisterServices() error {
}
func (e *UniversalExecutor) DeregisterServices() error {
e.logger.Printf("[ERR] executor: de-registering services and shutting down consul service")
e.logger.Printf("[INFO] executor: de-registering services and shutting down consul service")
if e.consulService != nil {
return e.consulService.Shutdown()
}