https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41921

--- Comment #22 from Kyle M Hall (khall) <[email protected]> ---
Created attachment 199318
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199318&action=edit
Bug 41921: Add per-run-type overrides to report concurrency caps

The existing caps in koha-conf.xml apply to every run type, so an
admin who wanted to leave plenty of headroom for background jobs
but keep a tight cap on foreground reports had no way to express
that. This commit adds six new keys that override the combined
caps per run type.

Each existing cap now has matching foreground_ and background_
keys. A value of 0 in any key means no limit, matching how the
combined keys already behave. When a run-type key is non-zero it
replaces the combined key for that run type and only counts
same-run-type queries:

- foreground_X caps count foreground processlist queries only.
- background_X caps count background processlist queries plus
  queued run_report jobs (queued jobs are always background).

Test plan
1) Apply patch
2) prove t/db_dependent/Koha/Reports.t
3) Set total_running_reports_per_instance_limit to 5 and
   foreground_total_running_reports_per_instance_limit to 2 in
   koha-conf.xml, restart all the things
4) Start 2 long foreground reports
5) Start a third foreground report, confirm the 'too many total
   reports' alert is shown
6) Queue 4 background reports (ReportsRunInBackground=always or
   the choose-run-mode page)
7) Confirm all 4 are enqueued (foreground cap doesn't apply to
   background, combined cap allows 5)
8) Queue a 5th, confirm it is enqueued, queue a 6th and confirm
   it is blocked by the combined cap
9) Unset the foreground override, set
   background_total_running_reports_per_instance_limit to 3 and
   restart, repeat steps 5 and 7 confirming the bg cap now applies

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to