changed lamdaemon to submit only 30 requests via
ssh. I had trouble with 600 requests at once
This commit is contained in:
parent
7c6f5efb4a
commit
dddbcdb8ae
|
@ -197,9 +197,16 @@ else {
|
||||||
$username[0] =~ s/uid=//;
|
$username[0] =~ s/uid=//;
|
||||||
$password = $ARGV[1];
|
$password = $ARGV[1];
|
||||||
# Put all transfered lines in one string
|
# Put all transfered lines in one string
|
||||||
|
$i = 0;
|
||||||
|
$j = 0;
|
||||||
if ($ARGV[2] ne "*test") {
|
if ($ARGV[2] ne "*test") {
|
||||||
while (defined($input = <STDIN>)) {
|
while (defined($input = <STDIN>)) {
|
||||||
$string = $string. $input;
|
$string[$i] .= $input;
|
||||||
|
$j++;
|
||||||
|
if ($j==30) {
|
||||||
|
$j=0;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { $argv = "*test\n"; }
|
else { $argv = "*test\n"; }
|
||||||
|
@ -207,6 +214,8 @@ else {
|
||||||
"UserKnownHostsFile /dev/null"
|
"UserKnownHostsFile /dev/null"
|
||||||
]);
|
]);
|
||||||
$ssh->login($username[0], $password);
|
$ssh->login($username[0], $password);
|
||||||
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string);
|
foreach $string2 ( @string ) {
|
||||||
print "$stdout";
|
($stdout, $stderr, $exit) = $ssh->cmd("sudo $remotepath $argv", $string2);
|
||||||
|
print "$stdout";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -460,7 +460,7 @@ echo "</title>\n".
|
||||||
if (is_array($errors))
|
if (is_array($errors))
|
||||||
for ($i=0; $i<sizeof($errors); $i++) StatusMessage($errors[$i][0], $errors[$i][1], $errors[$i][2]);
|
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) {
|
switch ($select_local) {
|
||||||
|
|
Loading…
Reference in New Issue