parallel_slot => n [starts at 1]
Sets the parallel targeter instance slot. Used to determine
which holds to process to avoid conflicts with other running instances.
+
+retarget_frozen => 1
+ Include frozen holds in batch hold retarget mode. This allows the
+ targeter to refresh frozen hold copy maps which get stale over time.
/
}
],
return ($self->{hold});
}
+ my %frozen_filter = $self->{retarget_frozen} ? () : (frozen => 'f');
+
my $query = {
select => {ahr => ['id']},
from => 'ahr',
capture_time => undef,
fulfillment_time => undef,
cancel_time => undef,
- frozen => 'f'
+ %frozen_filter
},
order_by => [
{class => 'ahr', field => 'selection_depth', direction => 'DESC'},
my $parallel = 0;
my $verbose = 0;
my $retarget_interval;
+my $retarget_frozen;
my $soft_retarget_interval;
my $next_check_interval;
my $recv_timeout = 3600;
'verbose' => \$verbose,
'parallel-init-sleep=i' => \$parallel_init_sleep,
'retarget-interval=s' => \$retarget_interval,
+ 'retarget-frozen' => \$retarget_frozen,
'next-check-interval=s' => \$next_check_interval,
'soft-retarget-interval=s' => \$soft_retarget_interval,
) || die "\nSee --help for more\n";
requested interval.
Overrides the 'circ.holds.retarget_interval' global_flag value.
+ --retarget-frozen
+ Include frozen holds in batch hold retarget mode. This allows the
+ targeter to refresh frozen hold copy maps which get stale over time.
+
HELP
exit(0);
parallel_count => $parallel,
parallel_slot => $slot,
retarget_interval => $retarget_interval,
+ retarget_frozen => $retarget_frozen,
next_check_interval => $next_check_interval,
soft_retarget_interval => $soft_retarget_interval
}
--- /dev/null
+Hold Targter --retarget-frozen option
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Adds a new --retarget-frozen option to hold_targeter_v2.pl that informs
+the hold targeter to include frozen holds in batch hold retarget
+mode. This allows the targeter to refresh frozen hold copy maps which
+get stale over time, leading to potentially bogus queue position
+calculations.
+
+This functionality is included as an option and not baked into the
+targeter based on the assumption that admins may wish to only retarget
+frozen holds at certain times, since including frozen holds can extend
+the overall targeter run time.
+