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

@ -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') ],
);