[open-ils-commits] [GIT] Evergreen ILS branch rel_2_9 updated. aaa0aec365419d20ff538759cbc33583846fcd95

Evergreen Git git at git.evergreen-ils.org
Tue Sep 20 14:04:51 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_9 has been updated
       via  aaa0aec365419d20ff538759cbc33583846fcd95 (commit)
      from  ba80a25631575789e745d09614f56c9e44c25239 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit aaa0aec365419d20ff538759cbc33583846fcd95
Author: Mike Rylander <mrylander at gmail.com>
Date:   Wed Sep 14 10:44:15 2016 -0400

    LP#1623541: Booking will fail if its router isn't called "router"
    
    The circ code checks to see if the booking app is running, and if not, it
    skips some booking-related logic. This is a useful performance enhancement
    where booking is not in use. It does this by asking the OpenSRF router if
    the "open-ils.booking" app has registered with it. Most of the time the
    OpenSRF router will be called, unimaginatively, "router" but when it's not,
    booking will not be considered by the circ module even if it's running.
    
    Instead of assuming "router" we should simply look up the router's name.
    
    Signed-off-by: Mike Rylander <mrylander at gmail.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
index f03e284..a8314b4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm
@@ -5,6 +5,7 @@ use OpenSRF::EX qw(:try);
 use OpenSRF::AppSession;
 use OpenSRF::Utils::SettingsClient;
 use OpenSRF::Utils::Logger qw(:logger);
+use OpenSRF::Utils::Config;
 use OpenILS::Const qw/:const/;
 use OpenILS::Application::AppUtils;
 use DateTime;
@@ -17,7 +18,12 @@ my $desk_renewal_use_circ_lib;
 
 sub determine_booking_status {
     unless (defined $booking_status) {
-        my $ses = create OpenSRF::AppSession("router");
+        my $router_name = OpenSRF::Utils::Config
+            ->current
+            ->bootstrap
+            ->router_name || 'router';
+
+        my $ses = create OpenSRF::AppSession($router_name);
         $booking_status = grep {$_ eq "open-ils.booking"} @{
             $ses->request("opensrf.router.info.class.list")->gather(1)
         };

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Circ/Circulate.pm      |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list