summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-04-17 18:48:25 +0000
committerivan <ivan>2011-04-17 18:48:25 +0000
commit184cd3c86cccf8cb4710c25a871018361960906f (patch)
tree894c6cd0f42ae4f3265277bb8309d9443042ee3f
parentc74fcbdbf96bdfa2eb2f34f843e4dc4fbc163245 (diff)
try at a multiprocess torrus-srvderive to hopefully catch/keep up, RT#10574
-rw-r--r--FS/bin/freeside-torrus-srvderive10
1 files changed, 7 insertions, 3 deletions
diff --git a/FS/bin/freeside-torrus-srvderive b/FS/bin/freeside-torrus-srvderive
index d3ea419a8..e83318fe8 100644
--- a/FS/bin/freeside-torrus-srvderive
+++ b/FS/bin/freeside-torrus-srvderive
@@ -59,8 +59,8 @@ my $sql = "
my $orderlimit = "
ORDER BY srv_date, srv_time
- LIMIT 50
-";
+ LIMIT 100
+"; #50?
our $kids = 0;
@@ -99,6 +99,10 @@ while (1) {
my @serviceids = $torrus_srvderive->component_serviceids;
exit unless @serviceids; #don't try to search for empty virtual ports
+ #nonlocking select statements; rows in this table never change
+ dbh->do('SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED')
+ if driver_name eq 'mysql';
+
my @in = ();
for my $dir ('_IN', '_OUT') {
push @in, map dbh->quote("$_$dir"), @serviceids;
@@ -163,7 +167,7 @@ while (1) {
die $@;
}
- warn "search finished; checking results\n" if $DEBUG;
+ warn "search for $serviceid finished; checking results\n" if $DEBUG;
my $prev = 0;
while ( my $row = $sth->fetchrow_arrayref ) {