LP#1312308 remove deprecated open-ils.penalty service
authorBill Erickson <berickxx@gmail.com>
Fri, 22 May 2015 20:07:29 +0000 (16:07 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 1 Jul 2015 14:51:23 +0000 (10:51 -0400)
open-ils.penalty service has not been used by Evergreen since before
version 2.0.  Instead of just cleaning out the script configuration,
clean out the entire application.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/examples/opensrf.xml.example
Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm [deleted file]
Open-ILS/src/perlmods/t/01-OpenILS-Application.t
docs/development/intro_opensrf.txt

index c7994db..3b47481 100644 (file)
@@ -785,30 +785,6 @@ vim:et:ts=4:sw=4:
                 </unix_config>
             </opensrf.dbmath>
 
-            <open-ils.penalty>
-                <keepalive>3</keepalive>
-                <stateless>1</stateless>
-                <language>perl</language>
-                <implementation>OpenILS::Application::Penalty</implementation>
-                <max_requests>99</max_requests>
-                <unix_config>
-                    <max_requests>1000</max_requests>
-                    <unix_log>open-ils.penalty_unix.log</unix_log>
-                    <unix_sock>open-ils.penalty_unix.sock</unix_sock>
-                    <unix_pid>open-ils.penalty_unix.pid</unix_pid>
-                    <min_children>1</min_children>
-                    <max_children>15</max_children>
-                    <min_spare_children>1</min_spare_children>
-                    <max_spare_children>5</max_spare_children>
-                </unix_config>
-                <app_settings>
-                    <patron_penalty>penalty/patron_penalty.js</patron_penalty>
-                    <script_path>LIBDIR/javascript</script_path>
-                    <script_path>LOCALSTATEDIR</script_path>
-                    <script_path>LOCALSTATEDIR/catalog</script_path>
-                </app_settings>
-            </open-ils.penalty>
-
             <open-ils.justintime>
                 <keepalive>5</keepalive>
                 <stateless>1</stateless>
@@ -1203,7 +1179,6 @@ vim:et:ts=4:sw=4:
                 <appname>open-ils.auth</appname> 
                 <appname>open-ils.auth_proxy</appname> 
                 <appname>open-ils.storage</appname>  
-                <appname>open-ils.penalty</appname>  
                 <appname>open-ils.justintime</appname>  
                 <appname>open-ils.cstore</appname>  
                 <appname>open-ils.collections</appname>  
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm
deleted file mode 100644 (file)
index 36fc8fc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-package OpenILS::Application::Penalty;
-use strict; use warnings;
-use OpenSRF::EX qw(:try);
-use OpenILS::Application;
-use OpenILS::Utils::Penalty;
-use OpenILS::Utils::CStoreEditor qw/:funcs/;
-use base 'OpenILS::Application';
-
-__PACKAGE__->register_method (
-    method   => 'patron_penalty',
-    api_name     => 'open-ils.penalty.patron_penalty.calculate',
-    signature => q/
-        Calculates the patron's standing penalties
-        @param args An object of named params including:
-            patronid The id of the patron
-            update True if this call should update the database
-            background True if this call should return immediately,
-                then go on to process the penalties.  This flag
-                works only in conjunction with the 'update' flag.
-        @return An object with keys 'fatal_penalties' and 
-        'info_penalties' who are themeselves arrays of 0 or 
-        more penalties.  Returns event on error.
-    /
-);
-
-# --------------------------------------------------------------
-# if $args->{background} is true, immediately respond complete 
-# to the caller, then finish the calculation
-# --------------------------------------------------------------
-sub patron_penalty {
-    my( $self, $conn, $args ) = @_;
-    $conn->respond_complete(1) if $$args{background};
-    my $e = new_editor(xact => 1);
-    OpenILS::Utils::Penalty->calculate_penalties($e, $args->{patronid}, $args->{context_org});
-    my $p = OpenILS::Utils::Penalty->retrieve_penalties($e, $args->{patronid}, $args->{context_org});
-    $e->commit;
-    return $p
-}
-
-
-1;
index 5474f61..c16416f 100644 (file)
@@ -1,7 +1,7 @@
 #!perl -T
 
 use utf8;
-use Test::More tests => 13;
+use Test::More tests => 12;
 
 BEGIN {
        use_ok( 'OpenILS::Application' );
@@ -11,7 +11,6 @@ use_ok( 'OpenILS::Application::AppUtils' );
 use_ok( 'OpenILS::Application::Booking' );
 use_ok( 'OpenILS::Application::Collections' );
 use_ok( 'OpenILS::Application::Fielder' );
-use_ok( 'OpenILS::Application::Penalty' );
 use_ok( 'OpenILS::Application::PermaCrud' );
 use_ok( 'OpenILS::Application::Reporter' );
 use_ok( 'OpenILS::Application::ResolverResolver' );
index 74d0f4e..06c3775 100644 (file)
@@ -1194,9 +1194,6 @@ set of OpenSRF services:
   * `open-ils.pcrud`: Supports access to Evergreen fieldmapper objects,
   restricted by staff user permissions. This is a private service.
     objects.
-  * `open-ils.penalty`: Supports the calculation of penalties for users, such as
-    being blocked from further borrowing, for conditions such as having too many
-    items checked out or too many unpaid fines.
   * `open-ils.permacrud`: Supports access to Evergreen fieldmapper objects,
   restricted by staff user permissions. This is a private service.
   * `open-ils.reporter`: Supports the creation and scheduling of reports.