[asterisk-bugs] [Asterisk 0012858]: "queue show" shows old (cached) information, whilst "queue show QUEUENAME" shows current information when using realtime.

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Jun 19 18:58:24 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=12858 
====================================================================== 
Reported By:                bcnit
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   12858
Category:                   Applications/app_queue
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.6.0-beta9 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             06-14-2008 07:54 CDT
Last Modified:              06-19-2008 18:58 CDT
====================================================================== 
Summary:                    "queue show" shows old (cached) information, whilst
"queue show QUEUENAME" shows current information when using realtime.
Description: 
Whenever 'queue show' is used, realtime is not queried for any updates.
When 'queue show QUEUENAME' is used, it is.

This is defined in apps/app_queue.c:

/* We only want to load realtime queues when a specific queue is asked
for. */
if (argc == 3)  /* specific queue */
   load_realtime_queue(argv[2]);

I appreciate that this has been deliberately coded this way, but in my
opinion, this is erroneous behaviour.

If realtime information is not loaded for each queue, then the output of
'queue show' is just plain wrong and can't be relied on - the command
simply becomes useless.

The response to bug http://bugs.digium.com/view.php?id=0012556 was that the AMI
should be used to collect
status information. At the moment, one must be aware of each queue name in
order to retrieve status information for it - The problem is that third
party applications cannot report on the status of queues using the AMI
without having this knowledge (i.e. access to the realtime data store). In
addition, even if they were aware of this, they would have to make one
'queue show QUEUENAME' call for each of the queues they require information
on - this is clearly inefficient at best.

I believe that the fact that 'queue show' returns incorrect information
should be considered a bug.

====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 06-19-08 18:58  
---------------------------------------------------------------------- 
I asked on the #asterisk-bugs IRC channel if there was some cited reason
for why a realtime queue is only retrieved when one is specifically
requested. Unfortunately, all that did was open a can of worms about the
flaws of realtime in general in Asterisk. Not very productive.

Anyway, my opinion on the matter is that using cached information is not a
good idea. Since I never got any good response from other developers
explaining why it was coded the way it was, I'm just going to change it,
since Asterisk is perfectly capable of retrieving all the realtime data. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
06-19-08 18:58  putnopvut      Note Added: 0088993                          
======================================================================




More information about the asterisk-bugs mailing list