express statement-limit in minutes
authorGalen Charlton <gmc@esilibrary.com>
Mon, 23 Mar 2015 19:11:45 +0000 (19:11 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 23 Mar 2015 19:11:45 +0000 (19:11 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/reporter/clark-kent.pl

index de8d806..27bbc28 100755 (executable)
@@ -34,7 +34,7 @@ my ($count, $config, $sleep_interval, $lockfile, $daemon) = (1, 'SYSCONFDIR/open
 # set upper bound on number of rows in the resultset
 # before Clark refuses to try to draw a chart
 my $max_rows_for_charts = 1000;
-my $statement_timeout = 10 * 60 * 1000;
+my $statement_timeout = 60;
 my $resultset_limit;
 
 GetOptions(
@@ -213,7 +213,7 @@ for my $r ( @reports ) {
                  RaiseError => 1
                }
        );
-       $data_dbh->do('SET statement_timeout = ?', {}, $statement_timeout);
+       $data_dbh->do('SET statement_timeout = ?', {}, ($statement_timeout * 60 * 1000));
 
        try {
                $state_dbh->do(<<'              SQL',{}, $r->{id});