[rhmessaging-commits] rhmessaging commits: r1487 - in mgmt: notes and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Fri Dec 14 09:44:56 EST 2007
Author: justi9
Date: 2007-12-14 09:44:56 -0500 (Fri, 14 Dec 2007)
New Revision: 1487
Modified:
mgmt/cumin/python/cumin/__init__.py
mgmt/cumin/python/cumin/broker.py
mgmt/notes/justin-todo.txt
Log:
Fixes a problem where the broker registration form would hang trying
to connect to added brokers. Now it simply stores the new
registrations and tells the broker connect thread that there have been
updates.
Modified: mgmt/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/cumin/python/cumin/__init__.py 2007-12-14 14:05:58 UTC (rev 1486)
+++ mgmt/cumin/python/cumin/__init__.py 2007-12-14 14:44:56 UTC (rev 1487)
@@ -9,7 +9,7 @@
from mint import *
from sqlobject.main import *
from time import sleep
-from threading import Thread
+from threading import Thread, Event
from model import CuminModel
from demo import DemoData
@@ -31,7 +31,8 @@
self.model = CuminModel()
- BrokerConnectThread(self.model).start()
+ self.broker_connect_thread = BrokerConnectThread(self.model)
+ self.broker_connect_thread.start()
self.cumin_page = CuminPage(self, "cumin.html")
self.set_default_page(self.cumin_page)
@@ -61,6 +62,12 @@
self.model = model
self.setDaemon(True)
+ self.event = Event()
+
+ def prompt(self):
+ self.event.set()
+ self.event.clear()
+
def run(self):
while True:
for reg in BrokerRegistration.select():
@@ -78,4 +85,4 @@
except socket.error:
print "Connection failed"
- sleep(15)
+ self.event.wait(30)
Modified: mgmt/cumin/python/cumin/broker.py
===================================================================
--- mgmt/cumin/python/cumin/broker.py 2007-12-14 14:05:58 UTC (rev 1486)
+++ mgmt/cumin/python/cumin/broker.py 2007-12-14 14:44:56 UTC (rev 1487)
@@ -665,7 +665,7 @@
reg.name = names[i]
- self.app.model.data.connectToBroker(reg.host, reg.port or 5672)
+ self.app.broker_connect_thread.prompt()
self.process_cancel(session, model)
Modified: mgmt/notes/justin-todo.txt
===================================================================
--- mgmt/notes/justin-todo.txt 2007-12-14 14:05:58 UTC (rev 1486)
+++ mgmt/notes/justin-todo.txt 2007-12-14 14:44:56 UTC (rev 1487)
@@ -23,8 +23,6 @@
* Need to handle exceptions in broker connect thread, so it doesn't
stop trying
- * Fix session and client naming
-
* Group form submit has different behaviors between hitting enter and
clicking submit
@@ -36,6 +34,9 @@
Deferred
+ * Add an edit form for broker registrations so you can change their
+ names
+
* Add inactive state to some status lights
* Paginate producers
More information about the rhmessaging-commits
mailing list