optimized PurgeOldInboxMessages workflow

This commit is contained in:
Graham Knop 2008-07-09 20:50:45 +00:00
parent 09ebb61b04
commit 3979d9c2e5
4 changed files with 20 additions and 2 deletions

View file

@ -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;

View file

@ -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