From d64ec9d1382ce94fa4ea39e8d1900feb82cb69ae Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Mon, 13 Jun 2016 15:37:32 +0200 Subject: [PATCH] Removing unwated line of code --- command/agent/consul/syncer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command/agent/consul/syncer.go b/command/agent/consul/syncer.go index 01239cc47..39a38b78c 100644 --- a/command/agent/consul/syncer.go +++ b/command/agent/consul/syncer.go @@ -224,7 +224,6 @@ func (c *Syncer) GenerateServiceID(groupName string, service *structs.Service, s // group name. func (c *Syncer) SetServices(groupName string, services []*structs.Service, serviceRegPrefix string) error { c.groupName = groupName - c.serviceRegPrefix = serviceRegPrefix var mErr multierror.Error numServ := len(services) registeredServices := make([]*consul.AgentServiceRegistration, 0, numServ) @@ -911,6 +910,7 @@ func (c *Syncer) runCheck(check Check) { } } +// KeepServices prunes all services besides the ones specified by the user func (c *Syncer) KeepServices(serviceRegPrefix string, servicesInRunningAllocs map[string][]*structs.Service) { servicesToKeep := make(map[string]struct{}) for allocID, services := range servicesInRunningAllocs {