Bugzilla – Attachment 162297 Details for
Bug 32565
Holds placed when all libraries are closed do not get added to holds queue if HoldsQueueSkipClosed and RealTimeHoldsQueue are enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32565: Remove unallocated param from cron script
Bug-32565-Remove-unallocated-param-from-cron-scrip.patch (text/plain), 3.33 KB, created by
Pedro Amorim
on 2024-02-20 14:45:53 UTC
(
hide
)
Description:
Bug 32565: Remove unallocated param from cron script
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-02-20 14:45:53 UTC
Size:
3.33 KB
patch
obsolete
>From b64d563d516324a717aed3719aade512a07bd8b9 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Tue, 20 Feb 2024 14:15:26 +0000 >Subject: [PATCH] Bug 32565: Remove unallocated param from cron script > >unallocated param is redundant, it is only relevant if RealTimeHoldsQueue is enabled, the cron should just fall back to unallocated mode if the sys pref is enabled. >This simplifies system administration, and does not require current Koha installations to update their cron configuration entry to make use of this fix. > >I think we should add a documentation note recommending using this cronjob when RealTimeHoldsQueue is enabled >--- > misc/cronjobs/holds/build_holds_queue.pl | 23 ++++++++++------------- > 1 file changed, 10 insertions(+), 13 deletions(-) > >diff --git a/misc/cronjobs/holds/build_holds_queue.pl b/misc/cronjobs/holds/build_holds_queue.pl >index 06b02041e5b..0dd6aeb33f4 100755 >--- a/misc/cronjobs/holds/build_holds_queue.pl >+++ b/misc/cronjobs/holds/build_holds_queue.pl >@@ -18,7 +18,7 @@ use Koha::Script -cron; > > =head1 NAME > >-build_holds_queue.pl - Rebuild the holds queue >+build_holds_queue.pl - Build the holds queue based on RealTimeHoldsQueue sys pref > > =head1 SYNOPSIS > >@@ -27,7 +27,7 @@ build_holds_queue.pl [-f] > Options: > -h --help Brief help message > -m --man Full documentation >- -f --force Run holds queue builder even if RealTimeHoldsQueue is enabled >+ -f --force Fully rebuilds the holds queue even if RealTimeHoldsQueue is enabled > > =head1 OPTIONS > >@@ -45,24 +45,21 @@ Prints the manual page and exits. > > allows this script to rebuild the entire holds queue even if the realtimeholdsqueue system preference is enabled. > >-=item b<--unallocated> >- >-prevents deletion of current queue and allows the script to only deal with holds not currently in the queue. >-This is useful when using the realtimeholdsqueue and skipping closed libraries, or allowing holds in the future >-This allows the script to catch holds that may have become active without triggering a real time update. >- > =back > > =head1 DESCRIPTION > >-This script builds or rebuilds the entire holds queue. >+This script rebuilds the entire holds queue if RealTimeHoldsQueue is disabled. >+ >+If RealTimeHoldsQueue is enabled, this script will only consider unallocated holds to add to the queue. >+This is useful when a real-time-hold fails to allocate due to closed libraries. >+This allows the script to catch holds that may have become active but failed to trigger a real time update. > > =cut > > my $help = 0; > my $man = 0; > my $force = 0; >-my $unallocated = 0; > > my $command_line_options = join( " ", @ARGV ); > >@@ -70,17 +67,17 @@ GetOptions( > 'h|help' => \$help, > 'm|man' => \$man, > 'f|force' => \$force, >- 'u|unallocated' => \$unallocated > ); > pod2usage(1) if $help; > pod2usage( -exitval => 0, -verbose => 2 ) if $man; > > my $rthq = C4::Context->preference('RealTimeHoldsQueue'); >+my $unallocated = 0; > > if ( $rthq && !$force ) { >- say "RealTimeHoldsQueue system preference is enabled, holds queue not built."; >+ say "RealTimeHoldsQueue system preference is enabled, holds queue not rebuilt. Checking unallocated holds only."; > say "Use --force to force building the holds queue."; >- exit(1); >+ $unallocated = 1; > } > > cronlogaction( { info => $command_line_options } ); >-- >2.30.2
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 32565
:
147659
|
161231
|
161232
|
161393
|
161394
|
161679
|
161680
|
162269
|
162297
|
164272
|
164273
|
164274
|
165166
|
165167
|
165168
|
165169
|
165800
|
165801
|
165802
|
165803