Skip to content

Commit

Permalink
Bug 1091485: show durable property on queue list. -r=mcote
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Yao committed Dec 22, 2015
1 parent df36aff commit d00a113
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pulseguardian/guardian.py
Expand Up @@ -68,8 +68,9 @@ def update_queue_information(self, queue_data):
# See bug 1066338.
return None

q_size, q_name = (queue_data['messages'],
queue_data['name'])
q_size, q_name, q_durable = (queue_data['messages'],
queue_data['name'],
queue_data['durable'])
queue = Queue.query.filter(Queue.name == q_name).first()

# If the queue doesn't exist in the db, create it.
Expand Down Expand Up @@ -101,6 +102,7 @@ def update_queue_information(self, queue_data):

# Update the saved queue size.
queue.size = q_size
queue.durable = q_durable
db_session.add(queue)
db_session.commit()
return queue
Expand Down
3 changes: 3 additions & 0 deletions pulseguardian/templates/queues_listing.html
Expand Up @@ -16,6 +16,9 @@ <h4>
<span class="label label-danger">Warning</span>
{% endif %}
{{queue.name}} <small>{{queue.size}} messages</small>
{% if queue.durable %}
<small><span class="label label-primary">Durable</span></small>
{% endif %}
</h4>

<div class="progress">
Expand Down

0 comments on commit d00a113

Please sign in to comment.