Bug 31995 - build_holds_queue.pl should check to see if the RealTime syspref is on
Summary: build_holds_queue.pl should check to see if the RealTime syspref is on
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Kyle M Hall
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-26 17:02 UTC by Liz Rea
Modified: 2022-11-23 16:02 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.07


Attachments
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on (3.36 KB, patch)
2022-10-27 17:49 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on (3.41 KB, patch)
2022-10-29 00:35 UTC, David Nind
Details | Diff | Splinter Review
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on (3.47 KB, patch)
2022-11-02 17:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31995: (QA follow-up) Add 'system preference' to help text (1.43 KB, patch)
2022-11-02 17:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on [v22.05] (3.54 KB, patch)
2022-11-14 19:27 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Liz Rea 2022-10-26 17:02:31 UTC
The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled. 

There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.

Thanks so much,
Liz
Comment 1 Kyle M Hall 2022-10-27 17:49:07 UTC
Created attachment 142725 [details] [review]
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on

The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled.

There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.

Test Plan:
1) Apply this patch
2) Try run misc/cronjobs/holds/build_holds_queue.pl with the -h/--help and -m/--man options
3) Disable RealTimeHoldsQueue
4) Run with no options, should succeed
5) Enable RealTimeHoldsQueue
6) Run with no options, should display a message and not rebuild the
   holds queue
7) Run again with the -f/--force option, should succeed
Comment 2 David Nind 2022-10-29 00:35:46 UTC
Created attachment 142798 [details] [review]
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on

The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled.

There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.

Test Plan:
1) Apply this patch
2) Try run misc/cronjobs/holds/build_holds_queue.pl with the -h/--help and -m/--man options
3) Disable RealTimeHoldsQueue
4) Run with no options, should succeed
5) Enable RealTimeHoldsQueue
6) Run with no options, should display a message and not rebuild the
   holds queue
7) Run again with the -f/--force option, should succeed

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2022-11-02 17:03:01 UTC
Created attachment 143016 [details] [review]
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on

The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled.

There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.

Test Plan:
1) Apply this patch
2) Try run misc/cronjobs/holds/build_holds_queue.pl with the -h/--help and -m/--man options
3) Disable RealTimeHoldsQueue
4) Run with no options, should succeed
5) Enable RealTimeHoldsQueue
6) Run with no options, should display a message and not rebuild the
   holds queue
7) Run again with the -f/--force option, should succeed

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2022-11-02 17:03:05 UTC
Created attachment 143017 [details] [review]
Bug 31995: (QA follow-up) Add 'system preference' to help text

We often get asked where something can be found in setting,
adding the hint that RealTimeHoldsQueue is a system preference
is hopefully helpful here.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2022-11-02 17:03:25 UTC
Love to see this script improved - most of this patch is documentation :)
Comment 6 Tomás Cohen Arazi 2022-11-03 12:56:06 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass 2022-11-10 23:40:48 UTC
Patchset will not apply cleanly to 22.05.x branch, please rebase if needed
Comment 8 Kyle M Hall 2022-11-14 19:27:39 UTC
Created attachment 143864 [details] [review]
Bug 31995: build_holds_queue.pl should check to see if the RealTimeHoldsQueue syspref is on [v22.05]

The real time hold queue and the build_holds_queue.pl jobs are not 100% compatible in that we should not be running the cron if the real time queue is enabled, this could lead to double server work. It would be good to have a check in build_holds_queue for the RealTimeHoldsQueue syspref and not run the job if the preference is enabled.

There might be times when we'd want to force a run of this job without changing the syspref. To that end we would also want a flag for this job so that system administrators could force the job from the command line if required, overriding this limitation.

Test Plan:
1) Apply this patch
2) Try run misc/cronjobs/holds/build_holds_queue.pl with the -h/--help and -m/--man options
3) Disable RealTimeHoldsQueue
4) Run with no options, should succeed
5) Enable RealTimeHoldsQueue
6) Run with no options, should display a message and not rebuild the
   holds queue
7) Run again with the -f/--force option, should succeed

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Bug 31995: (QA follow-up) Add 'system preference' to help text

We often get asked where something can be found in setting,
adding the hint that RealTimeHoldsQueue is a system preference
is hopefully helpful here.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Lucas Gass 2022-11-22 20:29:20 UTC
Thanks Kyle! Pushed to 22.05.x for upcoming 22.05.07 release