fixed: PurgeOldInboxMessages just didnt work
This commit is contained in:
parent
a239c98820
commit
afbc42dba3
2 changed files with 2 additions and 5 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
- fixed: DataForm doesn't work properly with internationalized fields
|
- fixed: DataForm doesn't work properly with internationalized fields
|
||||||
- fixed: incoming data not properly decoded from utf8
|
- fixed: incoming data not properly decoded from utf8
|
||||||
- fixed: Can't call method "getSku" on unblessed reference
|
- fixed: Can't call method "getSku" on unblessed reference
|
||||||
|
- fixed: PurgeOldInboxMessages just didn't work
|
||||||
|
|
||||||
7.5.22
|
7.5.22
|
||||||
- fixed: Layout template now gets prepared correctly
|
- fixed: Layout template now gets prepared correctly
|
||||||
|
|
|
||||||
|
|
@ -84,13 +84,9 @@ sub execute {
|
||||||
# keep track of how much time it's taking
|
# keep track of how much time it's taking
|
||||||
my $start = time;
|
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
|
my $sth
|
||||||
= $session->db->read(
|
= $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') ],
|
[ $start - $self->get('purgeAfter') ],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue