fixed: PurgeOldInboxMessages just didnt work

This commit is contained in:
Doug Bell 2008-08-25 21:32:26 +00:00
parent a239c98820
commit afbc42dba3
2 changed files with 2 additions and 5 deletions

View file

@ -8,6 +8,7 @@
- fixed: DataForm doesn't work properly with internationalized fields
- fixed: incoming data not properly decoded from utf8
- fixed: Can't call method "getSku" on unblessed reference
- fixed: PurgeOldInboxMessages just didn't work
7.5.22
- fixed: Layout template now gets prepared correctly

View file

@ -84,13 +84,9 @@ sub execute {
# keep track of how much time it's taking
my $start = time;
# Only purge this many per operation to prevent MySQL returning
# a half-million rows (which will take longer than the time we have)
my $limit = 2_500;
my $sth
= $session->db->read(
"SELECT messageId FROM inbox WHERE completedOn IS NOT NULL AND dateStamp < ? ASC LIMIT $limit",
"SELECT messageId FROM inbox WHERE completedOn IS NOT NULL AND dateStamp < ?",
[ $start - $self->get('purgeAfter') ],
);