optimized PurgeOldInboxMessages workflow
This commit is contained in:
parent
09ebb61b04
commit
3979d9c2e5
4 changed files with 20 additions and 2 deletions
|
|
@ -10,6 +10,7 @@
|
|||
- changed: show 25 items per page in asset manager
|
||||
- fixed: Asset Manager buttons now work in IE6
|
||||
- fixed: Donation: Add to Cart still visible in Thank You Message screen
|
||||
- optimized PurgeOldInboxMessages workflow
|
||||
|
||||
7.5.15
|
||||
- fixed: Colorpicker window would not open (Martin Kamerbeek / Oqapi)
|
||||
|
|
|
|||
|
|
@ -123,8 +123,17 @@ deleteBadReceiptEmailTemplate($session);
|
|||
unlockShelfAssets($session);
|
||||
removeOldGalleryImport($session);
|
||||
addMissingWorkflowActivities($session);
|
||||
addIndexToInbox($session);
|
||||
finish($session); # this line required
|
||||
|
||||
#-----------------------------------------------------------
|
||||
sub addIndexToInbox {
|
||||
my $session = shift;
|
||||
print "\tAdding index to inbox table... " unless $quiet;
|
||||
$session->db->write('ALTER TABLE `inbox` ADD INDEX `completedOn_dateStamp` (`completedOn`, `dateStamp`)');
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------
|
||||
sub addMissingWorkflowActivities {
|
||||
my $session = shift;
|
||||
|
|
|
|||
|
|
@ -28,10 +28,18 @@ my $quiet; # this line required
|
|||
|
||||
my $session = start(); # this line required
|
||||
|
||||
# upgrade functions go here
|
||||
addIndexToInbox($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addIndexToInbox {
|
||||
my $session = shift;
|
||||
print "\tAdding index to inbox table... " unless $quiet;
|
||||
$session->db->write('ALTER TABLE `inbox` ADD INDEX `completedOn_dateStamp` (`completedOn`, `dateStamp`)');
|
||||
print "Done.\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ sub execute {
|
|||
|
||||
my $sth
|
||||
= $session->db->read(
|
||||
"SELECT messageId FROM inbox WHERE completedOn IS NOT NULL AND dateStamp < ? ORDER BY dateStamp ASC LIMIT $limit",
|
||||
"SELECT messageId FROM inbox WHERE completedOn IS NOT NULL AND dateStamp < ? ASC LIMIT $limit",
|
||||
[ $start - $self->get('purgeAfter') ],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue