From: erickson Date: Tue, 10 Oct 2006 22:04:50 +0000 (+0000) Subject: added a log line to test if my "i lost my session" logic is correct" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d2c46a99e81b98a2d0b43610b2641e0b5ea9359f;p=evergreen%2Fpines.git added a log line to test if my "i lost my session" logic is correct" git-svn-id: svn://svn.open-ils.org/ILS/trunk@6437 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm index dcb85c9f98..f360a4764a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Utils/CStoreEditor.pm @@ -11,6 +11,14 @@ use OpenSRF::Utils::Logger qw($logger); my $U = "OpenILS::Application::AppUtils"; my %PERMS; +#my %PERMS = ( +# 'biblio.record_entry' => { update => 'UPDATE_MARC' }, +# 'asset.copy' => { update => 'UPDATE_COPY'}, +# 'asset.call_number' => { update => 'UPDATE_VOLUME'}, +# 'action.circulation' => { retrieve => 'VIEW_CIRCULATIONS'}, +#); + + # ----------------------------------------------------------------------------- # Export some useful functions @@ -238,7 +246,13 @@ sub request { my $argstr = __arg_to_string( (scalar(@params)) == 1 ? $params[0] : \@params); $self->log(I, "request $method : $argstr"); - + + if( $self->{xact} and + $self->session->state != OpenSRF::AppSession::CONNECTED() ) { + $logger->error("CStoreEditor lost it's connection!!"); + #throw OpenSRF::EX::ERROR ("CStoreEditor lost it's connection - cannot continue"); + } + try { $val = $self->session->request($method, @params)->gather(1);