X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2Fshrink_cgm_table.pl;h=bb6c8d487e243b0f41a5df9a0bf6acbf823b861e;hb=9c78a52fcd35d7d0c39a4798d583ca4d7b20fd73;hp=0ce3d287bcbd34412c8baf00701a97964e3b2cf0;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c;p=freeside.git diff --git a/rt/etc/upgrade/shrink_cgm_table.pl b/rt/etc/upgrade/shrink_cgm_table.pl index 0ce3d287b..bb6c8d487 100644 --- a/rt/etc/upgrade/shrink_cgm_table.pl +++ b/rt/etc/upgrade/shrink_cgm_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-2013 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::CachedGroupMembers; -my $cgms = RT::CachedGroupMembers->new( $RT::SystemUser ); +my $cgms = RT::CachedGroupMembers->new( RT->SystemUser ); $cgms->Limit( FIELD => 'id', OPERATOR => '!=', @@ -106,7 +106,7 @@ while ( my $rec = FetchNext( $cgms ) ) { $RT::Handle->Commit; } -use constant PAGE_SIZE => 1000; +use constant PAGE_SIZE => 10000; sub FetchNext { my ($objs, $init) = @_; if ( $init ) {