From d6e5a766f8b155cce00d43597aeb3f559b2c64c6 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 1 Apr 2010 19:54:19 +0000 Subject: [PATCH] Use utility method for firing events From my open-ils.acq.lineitem.cancel branch git-svn-id: svn://svn.open-ils.org/ILS/trunk@16095 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm index f834827b3f..350ffaed82 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Order.pm @@ -2519,17 +2519,13 @@ sub cancel_lineitem { $mgr->{post_commit} = []; } push @{ $mgr->{post_commit} }, sub { - my $trigger_ses = OpenSRF::AppSession->create('open-ils.trigger'); - $trigger_ses->connect; my $home_ou = $cached_usr_home_ou{$hold->usr}; if (! $home_ou) { my $user = $mgr->editor->retrieve_actor_user($hold->usr); # FIXME: how do we want to handle failures here? $home_ou = $user->home_ou; $cached_usr_home_ou{$hold->usr} = $home_ou; } - my $trigger_req = $trigger_ses->request('open-ils.trigger.event.autocreate', 'hold_request.cancel.cancelled_order', $hold, $home_ou); - $trigger_req->recv; - $trigger_ses->disconnect; + $U->create_events_for_hook('hold_request.cancel.cancelled_order', $hold, $home_ou); }; } } -- 2.11.0