[Asterisk-code-review] app queue: Ensure realtime members are updated if there is a... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Mon Nov 23 20:46:12 CST 2015


Matt Jordan has posted comments on this change.

Change subject: app_queue: Ensure realtime members are updated if there is a call in a queue
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/1694/2/apps/app_queue.c
File apps/app_queue.c:

Line 5339: 		/* Update realtime members each 5 iterations/seconds */
         : 		if (updrtcount < 5) {
         : 			updrtcount++;
         : 		} else {
         : 			update_realtime_members(qe->parent);
         : 			updrtcount = 0;
         : 		}
I'm not sure I understand the need for this change.

wait_our_turn is for callers 2 through the end of the queue. For those callers, they are simply in a holding pattern while they wait to move to the front of the queue. As such, it doesn't seem like there's any reason to update the realtime members in this routine.

I'd see the need for this if the front of the call queue does not update the realtime members, but that isn't the case. The head of the queue does update the realtime members if it does a call attempt and no one answers.

In what scenario are you finding the realtime members not updating fast enough?

As it is, it feels like this will spam the database with queries for the members in a somewhat inefficient fashion (even with the 5 count loop) - and may be masking some other scenario where the realtime members are not updated when they should be.


-- 
To view, visit https://gerrit.asterisk.org/1694
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Carlos Oliva <carlos.oliva at invoxcontact.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list