X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2Fshrink_transactions_table.pl;h=66bdcf50c6a1733baf052592f6286440b583fbdb;hp=b4f2e19078b933e2a3c7cba2becd3eb7d7d9a8bb;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/rt/etc/upgrade/shrink_transactions_table.pl b/rt/etc/upgrade/shrink_transactions_table.pl index b4f2e1907..66bdcf50c 100644 --- a/rt/etc/upgrade/shrink_transactions_table.pl +++ b/rt/etc/upgrade/shrink_transactions_table.pl @@ -1,9 +1,9 @@ -#!/usr/bin/perl +#!/usr/bin/env perl # BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -56,7 +56,7 @@ RT->Config->Set('LogToScreen' => 'debug'); RT::Init(); use RT::Transactions; -my $txns = RT::Transactions->new( $RT::SystemUser ); +my $txns = RT::Transactions->new( RT->SystemUser ); $txns->Limit( FIELD => 'ObjectType', OPERATOR => '=', @@ -106,7 +106,7 @@ while ( my $rec = FetchNext( $txns ) ) { $RT::Handle->Commit; } -use constant PAGE_SIZE => 1000; +use constant PAGE_SIZE => 10000; sub FetchNext { my ($objs, $init) = @_; if ( $init ) {