You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ey...@apache.org on 2011/10/25 23:38:01 UTC

svn commit: r1188934 - /incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py

Author: eyang
Date: Tue Oct 25 21:38:00 2011
New Revision: 1188934

URL: http://svn.apache.org/viewvc?rev=1188934&view=rev
Log:
AMBARI-92. Bugfix for retry heartbeat sending. (Eric Yang)

Modified:
    incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py

Modified: incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py?rev=1188934&r1=1188933&r2=1188934&view=diff
==============================================================================
--- incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py (original)
+++ incubator/ambari/trunk/agent/src/main/python/ambari_agent/Controller.py Tue Oct 25 21:38:00 2011
@@ -69,10 +69,10 @@ class Controller(threading.Thread):
                                 passwd=self.credential['password'])
       opener = urllib2.build_opener(auth_handler)
       urllib2.install_opener(opener)
+    retry=False
     while True:
-      retry=False
       try:
-        if retry!=False:
+        if retry==False:
           data = json.dumps(self.heartbeat.build(id))
           logger.info(data)
         req = urllib2.Request(self.url, data, {'Content-Type': 'application/json'})