Bugzilla – Attachment 6161 Details for
Bug 7138
Can't print basket group order pdf.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Signed patch
patch.txt (text/plain), 2.64 KB, created by
Marcel de Rooy
on 2011-11-03 09:02:08 UTC
(
hide
)
Description:
Signed patch
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2011-11-03 09:02:08 UTC
Size:
2.64 KB
patch
obsolete
>From 069ac950739e11b7204fd2e4c9dd0b63b96b2576 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 20 Oct 2011 09:57:12 +0200 >Subject: [PATCH] 6094 Follow up for cleanup_database >Content-Type: text/plain; charset="utf-8" > >Adds purging completed entries from need_merge_authorities table. >If you set dontmerge to ON, you need to periodically remove records. >--- > misc/cronjobs/cleanup_database.pl | 18 ++++++++++++++---- > 1 files changed, 14 insertions(+), 4 deletions(-) > >diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl >index 1333111..2b0cf90 100755 >--- a/misc/cronjobs/cleanup_database.pl >+++ b/misc/cronjobs/cleanup_database.pl >@@ -38,8 +38,8 @@ use Getopt::Long; > > sub usage { > print STDERR <<USAGE; >-Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] >- [-m|--mail] >+Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueue DAYS] [-m|--mail] [--merged] >+ > -h --help prints this help message, and exits, ignoring all > other options > --sessions purge the sessions table. If you use this while users >@@ -50,11 +50,12 @@ Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu > --zebraqueue DAYS purge completed entries from the zebraqueue from > more than DAYS days ago. > -m --mail purge the mail queue. >+ --merged purged completed entries from need_merge_authorities. > USAGE > exit $_[0]; > } > >-my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail ); >+my ( $help, $sessions, $sess_days, $verbose, $zebraqueue_days, $mail, $purge_merged); > > GetOptions( > 'h|help' => \$help, >@@ -63,13 +64,14 @@ GetOptions( > 'v|verbose' => \$verbose, > 'm|mail' => \$mail, > 'zebraqueue:i' => \$zebraqueue_days, >+ 'merged' => \$purge_merged, > ) || usage(1); > > if ($help) { > usage(0); > } > >-if ( !( $sessions || $zebraqueue_days || $mail ) ) { >+if ( !( $sessions || $zebraqueue_days || $mail || $purge_merged) ) { > print "You did not specify any cleanup work for the script to do.\n\n"; > usage(1); > } >@@ -134,6 +136,14 @@ if ($mail) { > $sth->execute() or $dbh->errstr; > print "Done with purging the mail queue.\n" if ($verbose); > } >+ >+if($purge_merged) { >+ print "Purging completed entries from need_merge_authorities.\n" if $verbose; >+ $sth = $dbh->prepare("DELETE FROM need_merge_authorities WHERE done=1"); >+ $sth->execute() or die $dbh->errstr; >+ print "Done with purging need_merge_authorities.\n" if $verbose; >+} >+ > exit(0); > > sub RemoveOldSessions { >-- >1.6.0.6 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7138
:
6153
|
6154
|
6161
|
6162