You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/07/23 20:44:29 UTC
svn commit: r1364749 -
/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
Author: chirino
Date: Mon Jul 23 18:44:28 2012
New Revision: 1364749
URL: http://svn.apache.org/viewvc?rev=1364749&view=rev
Log:
Fixes APLO-223 : Listener in Python Stomp example in Apollo doesn't wait for messages to be published
Modified:
activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
Modified: activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py?rev=1364749&r1=1364748&r2=1364749&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py (original)
+++ activemq/activemq-apollo/trunk/apollo-distro/src/main/release/examples/stomp/python/listener.py Mon Jul 23 18:44:28 2012
@@ -44,6 +44,7 @@ class MyListener(object):
diff = time.time() - self.start
print("Received %s in %f seconds" % (self.count, diff))
conn.disconnect()
+ sys.exit(0)
else:
if self.count==0:
@@ -59,3 +60,5 @@ conn.start()
conn.connect(login=user,passcode=password)
conn.subscribe(destination=destination, ack='auto')
print("Waiting for messages...")
+while 1:
+ time.sleep(10)