Closed (fixed)
Project:
Queue UI
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2010 at 01:21 UTC
Updated:
8 Sep 2013 at 20:56 UTC
Claim items without lease time and view queue contents.
Comments
Comment #1
coltraneOr maybe with lease time?
Comment #2
BenK commentedInteresting idea for a module.... just subscribing so I can keep track of it. Looking forward to trying it out.
Comment #3
coltraneHmmn, what if queue info hooks defined object translation for use when viewing the content? So, queue_ui would list each item in the queue and if the queue had defined an object translation function it would invoke it, otherwise it just prints the serialized content.
Comment #4
mr.baileysAs I'm currently using this as a troubleshooting tool, I'd be interested to see how you tackle this one, since:
a) Some queue implementations such as BatchQueue do not have a notion of lease time, so using claimItem() + releaseItem() as a way to "peek" won't work always work I think (in the case of BatchQueue, you would end up with the same item over and over again);
b) Queues can use all sorts of back-ends, so a simple SQL query won't do either;
c) Some queue implementations have a getAllItems() member function. Some...
d) Default queue implementations do not guarantee the order in which items are retrieved.
The only way I can think of (and which is pretty invasive) is to actually walk the queue, deleting (claimItem + deleteItem) and displaying items as you go, and then reinserting (insertItem) these items afterwards.
On the other hand, I might have missed some really obvious way to do this :)
Comment #5
coltraneYeah, I build queue_ui out of a specific need with the database queue, but it doesn't work necessarily for other implementations. I haven't solved viewing queue content yet, at least via this module, rather I just peak into the table myself via phpmyadmin or the cmd line.
Comment #6
geerlingguy commentedSubscribe.
Comment #7
cyberwolf commentedSubscribing.
Comment #8
tsphethean commentedJust realised I've probably created a duplicate issue with my post at http://drupal.org/node/1913330 which proposes how to do queue item viewing for DB queues.
For other backends, I think the queue implementing class would need to expose a mechanism to viewing queue data, as that class will include any relevant libraries for talking to the queue backend. For example, in the STOMP module (http://drupal.org/project/stomp), an additional method could be implemented to expose STOMP library calls to look at specific item data, but im not convinced all queues will provide this mechanism
Comment #9
tsphethean commentedThis feature has been added to the 7.x-2.x branch and is available in the latest dev release: http://drupal.org/node/2001996
Comment #10
tsphethean commented