changed lamdaemon to submit only 30 requests via

ssh. I had trouble with 600 requests at once
This commit is contained in:
katagia 2003-11-13 15:33:17 +00:00
parent 7c6f5efb4a
commit dddbcdb8ae
2 changed files with 13 additions and 4 deletions

View File

@ -197,9 +197,16 @@ else {
$username[0] =~ s/uid=//;
$password = $ARGV[1];
# Put all transfered lines in one string
$i = 0;
$j = 0;
if ($ARGV[2] ne "*test") {
while (defined($input = <STDIN>)) {
$string = $string. $input;
$string[$i] .= $input;
$j++;
if ($j==30) {
$j=0;
$i++;
}
}
}
else { $argv = "*test\n"; }
@ -207,6 +214,8 @@ else {
"UserKnownHostsFile /dev/null"
]);
$ssh->login($username[0], $password);
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string);
print "$stdout";
foreach $string2 ( @string ) {
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2);
print "$stdout";
}
}

View File

@ -460,7 +460,7 @@ echo "</title>\n".
if (is_array($errors))
for ($i=0; $i<sizeof($errors); $i++) StatusMessage($errors[$i][0], $errors[$i][1], $errors[$i][2]);
// print_r($account_old);
// print_r($account_new);
switch ($select_local) {