[freeside-commits] freeside/FS/FS otaker_Mixin.pm,1.5,1.6
Ivan,,,
ivan at wavetail.420.am
Sun Jul 25 00:30:44 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv16006
Modified Files:
otaker_Mixin.pm
Log Message:
limit memory use when upgrading attachments
Index: otaker_Mixin.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/otaker_Mixin.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- otaker_Mixin.pm 5 Jun 2010 21:44:51 -0000 1.5
+++ otaker_Mixin.pm 25 Jul 2010 07:30:42 -0000 1.6
@@ -40,11 +40,13 @@
my $class = shift;
my $table = $class->table;
+ my $limit = ( $table eq 'cust_attachment' ? 10 : 1000 );
+
while ( 1 ) {
my @records = qsearch({
'table' => $table,
'hashref' => {},
- 'extra_sql' => 'WHERE otaker IS NOT NULL LIMIT 1000',
+ 'extra_sql' => "WHERE otaker IS NOT NULL LIMIT $limit",
});
last unless @records;
More information about the freeside-commits
mailing list