Author: eallen
Date: 2010-09-17 16:58:32 -0400 (Fri, 17 Sep 2010)
New Revision: 4306
Modified:
mgmt/newdata/cumin/python/cumin/messaging/queue.py
mgmt/newdata/cumin/python/cumin/widgets.py
Log:
Fix BZ 634971: Couldn't move messages across queues
Modified: mgmt/newdata/cumin/python/cumin/messaging/queue.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/messaging/queue.py 2010-09-17 18:03:57 UTC (rev 4305)
+++ mgmt/newdata/cumin/python/cumin/messaging/queue.py 2010-09-17 20:58:32 UTC (rev 4306)
@@ -553,11 +553,12 @@
def __init__(self, app, name, form, param):
super(QueueSelectField, self).__init__(app, name)
+ self.org_param = param
self.param = self.QueueSearchInputSet(app, "queue_set", param)
self.add_child(self.param)
def get(self, session):
- return self.param.get(session)
+ return self.org_param.get(session)
def render_title(self, session):
return "Queue"
@@ -579,7 +580,7 @@
vhostid = vhost._id
queues = cls.get_selection(session.cursor, _vhostRef_id=vhostid)
queue_list_full = sorted_by(list(queues))
- delta = timedelta(minutes=10)
+ delta = timedelta(days=3)
queue_list = []
for _queue in queue_list_full:
if _queue._qmf_update_time > (datetime.now() - delta):
@@ -625,8 +626,9 @@
self.src_queue = src_queue
self.add_field(src_queue)
- queue = QueueParameter(app, "dqueue")
- self.dest_queue = self.QueueDestField(app, "dest", self, queue)
+ self.dqueue = StringParameter(app, "dqueue")
+ self.add_parameter(self.dqueue)
+ self.dest_queue = self.QueueDestField(app, "dest", self, self.dqueue)
self.dest_queue.required = True
self.add_field(self.dest_queue)
@@ -663,10 +665,11 @@
class MoveMessagesForm(MoveMessagesFormBase):
def __init__(self, app, name, task):
- queue = QueueParameter(app, "queue")
- src_queue = self.QueueSrctField(app, "src", self, queue)
+ self.squeue = StringParameter(app, "queue")
+ src_queue = self.QueueSrctField(app, "src", self, self.squeue)
src_queue.required = True
super(MoveMessagesForm, self).__init__(app, name, task, src_queue)
+ self.add_parameter(self.squeue)
class QueueSrctField(QueueSelectField):
def render_title(self, session):
Modified: mgmt/newdata/cumin/python/cumin/widgets.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-17 18:03:57 UTC (rev 4305)
+++ mgmt/newdata/cumin/python/cumin/widgets.py 2010-09-17 20:58:32 UTC (rev 4306)
@@ -1493,7 +1493,7 @@
if not self.disabled:
obj_list_full = sorted_by(list(objects))
- delta = timedelta(minutes=10)
+ delta = timedelta(days=3)
for _obj in obj_list_full:
if (_obj._qmf_update_time > (datetime.now() - delta)):
obj_list.append(_obj)