what is the purpose of this loop in AST_VDadapt.pl

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

what is the purpose of this loop in AST_VDadapt.pl

Postby bobbymc » Tue Apr 07, 2020 3:27 am

why does this while loop exist? whats the logic behind it?



while($it < $stat_it)



if ($stat_count < 15)
{
$stat_it = $stat_count;
$stat_B = 1;
}
else
{
$stat_B = ($stat_count - 14);
}

$it=0;
while($it < $stat_it)
{
$it_ary = ($it + $stat_B);
$ready_diff_total[$i] = ($ready_diff_total[$i] + $stat_ready_agents[$i][$it_ary]);
$waiting_diff_total[$i] = ($waiting_diff_total[$i] + $stat_waiting_calls[$i][$it_ary]);
$total_agents_total[$i] = ($total_agents_total[$i] + $stat_total_agents[$i][$it_ary]);
# $event_string="$stat_count $it_ary $stat_total_agents[$i][$it_ary]|$stat_ready_agents[$i][$it_ary]|$stat_waiting_calls[$i][$it_ary]";
# if ($DB) {print " $event_string\n";}
# &event_logger;
$it++;
}


bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Re: what is the purpose of this loop in AST_VDadapt.pl

Postby williamconley » Tue Apr 21, 2020 1:22 pm

Looks like it's iterating through servers? But to find out, you'll need to find the origin of $stat_count and what is stored in arrays such as $ready_diff_total[]
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20258
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Development

Who is online

Users browsing this forum: No registered users and 29 guests