Bugzilla – Attachment 98938 Details for
Bug 24651
Add --maxdays option to the `fines.pl` cronjob to reduce the chance of re-processing very old, already capped, fines.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24651: Add maxdays option to fines cronjob
Bug-24651-Add-maxdays-option-to-fines-cronjob.patch (text/plain), 1.69 KB, created by
Kyle M Hall (khall)
on 2020-02-14 12:30:17 UTC
(
hide
)
Description:
Bug 24651: Add maxdays option to fines cronjob
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2020-02-14 12:30:17 UTC
Size:
1.69 KB
patch
obsolete
>From 42c4323be8d267bbefc999e424a27b4d8cc7047f Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 13 Feb 2020 10:46:22 +0000 >Subject: [PATCH] Bug 24651: Add maxdays option to fines cronjob > >This patch adds an optional maxdays parameter to the fines.pl cronjob. >The new parameter allows system administrators to set a maximum number >of days for the job to process overdues. This can improve performance. > >Signed-off-by: Sally Healey <sally.healey@cheshiresharedservices.gov.uk> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > misc/cronjobs/fines.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/misc/cronjobs/fines.pl b/misc/cronjobs/fines.pl >index f04da4b280..df85affd8d 100755 >--- a/misc/cronjobs/fines.pl >+++ b/misc/cronjobs/fines.pl >@@ -45,12 +45,14 @@ my $help; > my $verbose; > my $output_dir; > my $log; >+my $maxdays; > > GetOptions( > 'h|help' => \$help, > 'v|verbose' => \$verbose, > 'l|log' => \$log, > 'o|out:s' => \$output_dir, >+ 'm|maxdays:i' => \$maxdays, > ); > my $usage = << 'ENDUSAGE'; > >@@ -64,6 +66,7 @@ This script has the following parameters : > -l --log: log the output to a file (optional if the -o parameter is given) > -o --out: ouput directory for logs (defaults to env or /tmp if !exist) > -v --verbose >+ -m --maxdays: how many days back of overdues to process > > ENDUSAGE > >@@ -97,7 +100,9 @@ if ($filename) { > print {$fh} "\n"; > } > my $counted = 0; >-my $overdues = Getoverdues(); >+my $params; >+$params->{maximumdays} = $maxdays if $maxdays; >+my $overdues = Getoverdues($params); > for my $overdue ( @{$overdues} ) { > next if $overdue->{itemlost}; > >-- >2.21.1 (Apple Git-122.3)
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 24651
:
98806
|
98933
| 98938