freeside/FS/bin freeside-daily,1.16,1.17
ivan
ivan at pouncequick.420.am
Thu Mar 10 01:56:11 PST 2005
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory pouncequick:/tmp/cvs-serv3175
Modified Files:
freeside-daily
Log Message:
fine.
Index: freeside-daily
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-daily,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- freeside-daily 22 Dec 2004 09:53:18 -0000 1.16
+++ freeside-daily 10 Mar 2005 09:56:07 -0000 1.17
@@ -5,7 +5,7 @@
use Date::Parse;
use Getopt::Std;
use FS::UID qw(adminsuidsetup driver_name dbh datasrc);
-use FS::Record qw(qsearch qsearchs);
+use FS::Record qw(qsearch qsearchs dbdef);
use FS::Conf;
use FS::cust_main;
@@ -57,8 +57,10 @@
if ( driver_name eq 'Pg' ) {
dbh->{AutoCommit} = 1; #so we can vacuum
- my $sth = dbh->prepare('vacuum analyze') or die dbh->errstr;
- $sth->execute or die $sth->errstr;
+ foreach my $table ( dbdef->tables ) {
+ my $sth = dbh->prepare("VACUUM ANALYZE $table") or die dbh->errstr;
+ $sth->execute or die $sth->errstr;
+ }
}
my $conf = new FS::Conf;
More information about the freeside-commits
mailing list