by mcargile » Mon Jun 25, 2007 4:10 pm
So I have rewritten FastAGI_log.pl to use the Asterisk::FastAGI perl module and have it so that it is only connecting to the DB once per child. It is also only reading in its configuration once per child as well. I have not yet gotten it to do the caching of queries (not a big thing just not enough time today). The script is working in performance testing mode. Agents are getting calls and hanging up correctly. I have not tested if everything else is working yet or not, and there are somethings I really cannot test like the queuemetric stuff. I plan on doing some performance testing once I have everything the way I would like it. If that pans out I plan on testing it with one of our clients. And if all goes well with that posting it to the bug tracker.
The big issue is now that the children are only reading in their configuration and connecting to the DB when they are started, any changes made to the configurations requires restarting FastAGI_log.pl.
Originally I planned on making it so that if you called it with the right option it would reload it's configuration. Problem is though only the child that handled the request would reload. I am instead thinking of making it check how many seconds it has been since the last reload and if it is larger than a configurable value reload. I plan on placing the variable in the /etc/astguiclient.conf file under VARfastagi_log_reload_time and making the default value 60 because any changes in Vicidial take upwards of 60 seconds to take effect. Does this sound like an acceptable solution?
Another option would be to create a configuration number in the DB and if the configuration number the child is currently using is less than the one in the DB reload. This way it would only do so when told. This method would take more work on the part of the person making a change. They would need to click a link or run an SQL query. And if they were to click a link someone would have to put the link in place. The configuration number could just be the epoch of when the link was clicked.
Anyways would like some input on this.
Last edited by
mcargile on Mon Aug 20, 2007 11:42 am, edited 1 time in total.
Michael Cargile | Director of Engineering | ViciDialGroup | http://www.vicidial.com
The official source for VICIDIAL services and support. 1-888-894-VICI (8424)