From 432a106facf4ee93e544408d70524f06d55ff56e Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Fri, 22 May 2015 16:07:29 -0400 Subject: [PATCH] LP#1312308 remove deprecated open-ils.penalty service 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 Signed-off-by: Jason Stephenson --- Open-ILS/examples/opensrf.xml.example | 25 ----------- .../lib/OpenILS/Application/Penalty.pm | 41 ------------------- .../src/perlmods/t/01-OpenILS-Application.t | 3 +- docs/development/intro_opensrf.txt | 3 -- 4 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm diff --git a/Open-ILS/examples/opensrf.xml.example b/Open-ILS/examples/opensrf.xml.example index c7994db756..3b47481f86 100644 --- a/Open-ILS/examples/opensrf.xml.example +++ b/Open-ILS/examples/opensrf.xml.example @@ -785,30 +785,6 @@ vim:et:ts=4:sw=4: - - 3 - 1 - perl - OpenILS::Application::Penalty - 99 - - 1000 - open-ils.penalty_unix.log - open-ils.penalty_unix.sock - open-ils.penalty_unix.pid - 1 - 15 - 1 - 5 - - - penalty/patron_penalty.js - LIBDIR/javascript - LOCALSTATEDIR - LOCALSTATEDIR/catalog - - - 5 1 @@ -1203,7 +1179,6 @@ vim:et:ts=4:sw=4: open-ils.auth open-ils.auth_proxy open-ils.storage - open-ils.penalty open-ils.justintime open-ils.cstore open-ils.collections 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 index 36fc8fc8e3..0000000000 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Penalty.pm +++ /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; diff --git a/Open-ILS/src/perlmods/t/01-OpenILS-Application.t b/Open-ILS/src/perlmods/t/01-OpenILS-Application.t index 5474f61acb..c16416fcd3 100644 --- a/Open-ILS/src/perlmods/t/01-OpenILS-Application.t +++ b/Open-ILS/src/perlmods/t/01-OpenILS-Application.t @@ -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' ); diff --git a/docs/development/intro_opensrf.txt b/docs/development/intro_opensrf.txt index 74d0f4e0a5..06c3775c42 100644 --- a/docs/development/intro_opensrf.txt +++ b/docs/development/intro_opensrf.txt @@ -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. -- 2.43.2