[open-ils-commits] r7959 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Nov 1 12:34:57 EDT 2007
Author: erickson
Date: 2007-11-01 12:20:05 -0400 (Thu, 01 Nov 2007)
New Revision: 7959
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
clearing current_copy and prev_check_time on previously targeted hold instead of running the hold targeter inline
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2007-11-01 15:24:26 UTC (rev 7958)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2007-11-01 16:20:05 UTC (rev 7959)
@@ -1326,10 +1326,12 @@
# re-target any other holds that already target this copy
for my $old_hold (@$old_holds) {
next if $old_hold->id eq $best_hold->id; # don't re-target the hold we want
- $logger->info("circulator: re-targeting hold ".$old_hold->id.
- " after a better hold [".$best_hold->id."] was found");
- $U->storagereq(
- 'open-ils.storage.action.hold_request.copy_targeter', undef, $old_hold->id );
+ $logger->info("circulator: clearing current_copy and prev_check_time on hold ".
+ $old_hold->id." after a better hold [".$best_hold->id."] was found");
+ $old_hold->clear_current_copy;
+ $old_hold->clear_prev_check_time;
+ $editor->update_action_hold_request($old_hold)
+ or return (undef, $editor->event);
}
return ($best_hold);
More information about the open-ils-commits
mailing list