[Astpp-commit] SF.net SVN: astpp:[2313] trunk/scripts/astpp-rate-engine.pl
Brought to you by:
darrenkw
From: <dar...@us...> - 2010-06-05 21:26:35
|
Revision: 2313 http://astpp.svn.sourceforge.net/astpp/?rev=2313&view=rev Author: darrenkw Date: 2010-06-05 21:26:28 +0000 (Sat, 05 Jun 2010) Log Message: ----------- Added support to rate cdrs from multiple hosts. You just run astpp-rate-engine.pl as follows: astpp-rate-engine.pl cdr_db=remotedatabase cdr_dbpass=password cdr_dbhost=1.1.1.1 cdr_dbuser=remoteuser. Modified Paths: -------------- trunk/scripts/astpp-rate-engine.pl Modified: trunk/scripts/astpp-rate-engine.pl =================================================================== --- trunk/scripts/astpp-rate-engine.pl 2010-03-24 18:32:47 UTC (rev 2312) +++ trunk/scripts/astpp-rate-engine.pl 2010-06-05 21:26:28 UTC (rev 2313) @@ -41,8 +41,16 @@ sub initialize() { $SIG{INT} = \&catch_zap; $config = &load_config(); + + foreach my $param ( param() ) { + $config->{$param} = param($param); + } + $astpp_db = &connect_db( $config, @output ); $config = &load_config_db($astpp_db,$config); + foreach my $param ( param() ) { + $config->{$param} = param($param); + } $cdr_db = &cdr_connect_db( $config, @output ); open( LOGFILE, ">>$config->{log_file}" ) || die "Log Error - could not open $config->{log_file} for writing\n"; @@ -52,8 +60,8 @@ close("LOGFILE"); } ################# Program Starts HERE ################################# -$uniqueid = param('uniqueid'); #$ARGV[0]; -$run_type = param('runtype'); # realtime,batch,price_only +$uniqueid = param('uniqueid'); +$run_type = param('runtype'); &initialize(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |