nice addition to hopper script

Discussions about development of VICIDIAL and astGUIclient

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

nice addition to hopper script

Postby bobbymc » Tue Nov 04, 2008 6:26 pm

matt im not sure how to submit this in any other wa but what happens is that sometiems the database gets defragmented in the middle of production due to all the leads we uploaded and causes the hopper scritp to take longer then a minute or sometiems more then a minute.. please place this code after the no command printout and it will prevent the hopper scritpt o run unlimited amount of tiems which can prevent the database from crashing




my $scriptName = "AST_VDhopper.pl";

my $cmd = "ps aux | grep " . $scriptName;
my $result = `$cmd`;
my @lines = split("\\n", $result);
my $total_proc=0;
foreach(@lines) {
#ignore results for the grep command and this script
unless ($_ =~ m/grep|launcher/){
$total_proc++;
}
}

if($total_proc>=4){exit;}
bobbymc
 
Posts: 425
Joined: Fri Jan 05, 2007 12:26 am

Return to Development

Who is online

Users browsing this forum: No registered users and 34 guests