From 1ab514f2cba76feb40fb3d12d9b435b0e47846a7 Mon Sep 17 00:00:00 2001 From: James Fournie Date: Mon, 21 May 2012 15:19:39 -0700 Subject: [PATCH] isolating the existence of the non multi-session into the only function that uses it --- marc_export_custom/marc_export_custom_ms | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/marc_export_custom/marc_export_custom_ms b/marc_export_custom/marc_export_custom_ms index d42ce48..ac6adf0 100755 --- a/marc_export_custom/marc_export_custom_ms +++ b/marc_export_custom/marc_export_custom_ms @@ -160,7 +160,6 @@ if (!$idl) { Fieldmapper->import(IDL => $idl); -my $ses = OpenSRF::AppSession->create('open-ils.cstore'); my $bibses = OpenSRF::MultiSession->new( app => 'open-ils.cstore', @@ -411,6 +410,7 @@ sub stats { sub get_bib_locations { print STDERR "Retrieving Org Units ... "; + my $ses = OpenSRF::AppSession->connect('open-ils.cstore'); my $r = $ses->request( 'open-ils.cstore.direct.actor.org_unit.search', { id => { '!=' => undef } } ); while (my $o = $r->recv) { @@ -459,6 +459,7 @@ sub get_bib_locations { print STDERR "OK\n"; $flesh = { flesh => 2, flesh_fields => { bre => [ 'call_numbers' ], acn => [ 'copies' ] } }; + $ses->disconnect; } sub add_bib_holdings { -- 2.3.6