[open-ils-commits] [GIT] Evergreen ILS branch master updated. 89c78443a481a3561ae5ff6bc83c94d8e6af67c0

Evergreen Git git at git.evergreen-ils.org
Tue Sep 20 14:03:19 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, master has been updated
       via  89c78443a481a3561ae5ff6bc83c94d8e6af67c0 (commit)
      from  34cc6d301c8e078a06736c48fc13591aaf3f0955 (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 89c78443a481a3561ae5ff6bc83c94d8e6af67c0
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 dcef1d2..d142df6 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