|
Lines 59-64
Usage: $0 [-h|--help] [--sessions] [--sessdays DAYS] [-v|--verbose] [--zebraqueu
Link Here
|
| 59 |
--merged purged completed entries from need_merge_authorities. |
59 |
--merged purged completed entries from need_merge_authorities. |
| 60 |
--import DAYS purge records from import tables older than DAYS days. |
60 |
--import DAYS purge records from import tables older than DAYS days. |
| 61 |
Defaults to 60 days if no days specified. |
61 |
Defaults to 60 days if no days specified. |
|
|
62 |
--calendar DAYS purge rows from koha.special_holidays-table older than DAYS days. |
| 63 |
Defaults to 362 days if no days specified. |
| 62 |
--z3950 purge records from import tables that are the result |
64 |
--z3950 purge records from import tables that are the result |
| 63 |
of Z39.50 searches |
65 |
of Z39.50 searches |
| 64 |
--logs DAYS purge entries from action_logs older than DAYS days. |
66 |
--logs DAYS purge entries from action_logs older than DAYS days. |
|
Lines 74-80
USAGE
Link Here
|
| 74 |
my ( |
76 |
my ( |
| 75 |
$help, $sessions, $sess_days, $verbose, |
77 |
$help, $sessions, $sess_days, $verbose, |
| 76 |
$zebraqueue_days, $mail, $purge_merged, $pImport, |
78 |
$zebraqueue_days, $mail, $purge_merged, $pImport, |
| 77 |
$pLogs, $pSearchhistory, $pZ3950, |
79 |
$pLogs, $pSearchhistory, $pZ3950, $calendar, |
| 78 |
$pListShareInvites, |
80 |
$pListShareInvites, |
| 79 |
); |
81 |
); |
| 80 |
|
82 |
|
|
Lines 87-92
GetOptions(
Link Here
|
| 87 |
'zebraqueue:i' => \$zebraqueue_days, |
89 |
'zebraqueue:i' => \$zebraqueue_days, |
| 88 |
'merged' => \$purge_merged, |
90 |
'merged' => \$purge_merged, |
| 89 |
'import:i' => \$pImport, |
91 |
'import:i' => \$pImport, |
|
|
92 |
'calendar:i' => \$calendar, |
| 90 |
'z3950' => \$pZ3950, |
93 |
'z3950' => \$pZ3950, |
| 91 |
'logs:i' => \$pLogs, |
94 |
'logs:i' => \$pLogs, |
| 92 |
'searchhistory:i' => \$pSearchhistory, |
95 |
'searchhistory:i' => \$pSearchhistory, |
|
Lines 112-117
unless ( $sessions
Link Here
|
| 112 |
|| $mail |
115 |
|| $mail |
| 113 |
|| $purge_merged |
116 |
|| $purge_merged |
| 114 |
|| $pImport |
117 |
|| $pImport |
|
|
118 |
|| $calendar |
| 115 |
|| $pLogs |
119 |
|| $pLogs |
| 116 |
|| $pSearchhistory |
120 |
|| $pSearchhistory |
| 117 |
|| $pZ3950 |
121 |
|| $pZ3950 |
|
Lines 188-193
if($purge_merged) {
Link Here
|
| 188 |
print "Done with purging need_merge_authorities.\n" if $verbose; |
192 |
print "Done with purging need_merge_authorities.\n" if $verbose; |
| 189 |
} |
193 |
} |
| 190 |
|
194 |
|
|
|
195 |
if ($calendar) { |
| 196 |
my $daysOld = $calendar || 362; |
| 197 |
print "Purging koha.special_holidays from '$calendar' days ago.\n" if $verbose; |
| 198 |
eval { |
| 199 |
Koha::Calendar::cleanupCalendar(); |
| 200 |
}; |
| 201 |
if ($@) { |
| 202 |
warn DateTime->now()->iso8601()." - Exception while purging the Calendar:\n".$@; |
| 203 |
} |
| 204 |
} |
| 205 |
|
| 191 |
if($pImport) { |
206 |
if($pImport) { |
| 192 |
print "Purging records from import tables.\n" if $verbose; |
207 |
print "Purging records from import tables.\n" if $verbose; |
| 193 |
PurgeImportTables(); |
208 |
PurgeImportTables(); |
| 194 |
- |
|
|