@@ -109,15 +109,13 @@ func (s *Server) publishContainer(container *docker.APIContainers, ttl time.Dura
109109 appName := match [1 ]
110110 appPath := fmt .Sprintf ("%s/%s" , appName , containerName )
111111 keyPath := fmt .Sprintf ("/deis/services/%s" , appPath )
112- dirPath := fmt .Sprintf ("/deis/services/%s" , appName )
113112 for _ , p := range container .Ports {
114113 // lowest port wins (docker sorts the ports)
115114 // TODO (bacongobbler): support multiple exposed ports
116115 port := strconv .Itoa (int (p .PublicPort ))
117116 hostAndPort := s .host + ":" + port
118117 if s .IsPublishableApp (containerName ) && s .IsPortOpen (hostAndPort ) {
119118 s .setEtcd (keyPath , hostAndPort , uint64 (ttl .Seconds ()))
120- s .updateDir (dirPath , uint64 (ttl .Seconds ()))
121119 safeMap .Lock ()
122120 safeMap .data [container .ID ] = appPath
123121 safeMap .Unlock ()
@@ -234,14 +232,3 @@ func (s *Server) removeEtcd(key string, recursive bool) {
234232 log .Println ("del" , key )
235233 }
236234}
237-
238- // updateDir updates the given directory for a given ttl. It succeeds
239- // only if the given directory already exists.
240- func (s * Server ) updateDir (directory string , ttl uint64 ) {
241- if _ , err := s .EtcdClient .UpdateDir (directory , ttl ); err != nil {
242- log .Println (err )
243- }
244- if s .logLevel == "debug" {
245- log .Println ("updateDir" , directory )
246- }
247- }
0 commit comments