[open-ils-commits] r18140 - in trunk/Open-ILS/src/perlmods/OpenILS/Application: . Trigger (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Oct 3 11:06:47 EDT 2010
Author: erickson
Date: 2010-10-03 11:06:45 -0400 (Sun, 03 Oct 2010)
New Revision: 18140
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
Log:
moved the cache clear to later in the firing to pick up data; fixed some typos/thinkos
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-10-03 14:17:38 UTC (rev 18139)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger/Event.pm 2010-10-03 15:06:45 UTC (rev 18140)
@@ -449,11 +449,11 @@
for my $did ( keys %_object_by_path_cache ) {
my $phash = $_object_by_path_cache{$did};
for my $path ( keys %$phash ) {
- my $shash = $phash{$path};
+ my $shash = $$phash{$path};
for my $step ( keys %$shash ) {
- my $fhash = $shash{$step};
+ my $fhash = $$shash{$step};
for my $ffield ( keys %$fhash ) {
- my $lhash = $fhash{$ffield};
+ my $lhash = $$fhash{$ffield};
for my $lfield ( keys %$lhash ) {
delete $$lhash{$lfield};
}
@@ -525,7 +525,7 @@
$context->$lfield()
);
- $_object_by_path_cache{$self->event->event_def->id}{join('.',@$path)}{$ffield}{$context->$lfield()} ||= $obj;
+ $_object_by_path_cache{$self->event->event_def->id}{join('.',@$path)}{$step}{$ffield}{$context->$lfield()} ||= $obj;
if ($self->standalone) {
$ed->xact_rollback || return undef;
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-10-03 14:17:38 UTC (rev 18139)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm 2010-10-03 15:06:45 UTC (rev 18140)
@@ -539,7 +539,6 @@
my $event_id = shift;
my $e = OpenILS::Application::Trigger::Event->new($event_id);
- OpenILS::Application::Trigger::Event->ClearObjectCache();
if ($e->validate->valid) {
$logger->info("trigger: Event is valid, reacting...");
@@ -547,6 +546,7 @@
}
$e->editor->disconnect;
+ OpenILS::Application::Trigger::Event->ClearObjectCache();
return {
valid => $e->valid,
@@ -568,7 +568,6 @@
my $events = shift;
my $e = OpenILS::Application::Trigger::EventGroup->new(@$events);
- OpenILS::Application::Trigger::Event->ClearObjectCache();
if ($e->validate->valid) {
$logger->info("trigger: Event group is valid, reacting...");
@@ -576,6 +575,7 @@
}
$e->editor->disconnect;
+ OpenILS::Application::Trigger::Event->ClearObjectCache();
return {
valid => $e->valid,
More information about the open-ils-commits
mailing list