Hold Targeter V2 Repairs & Improvements
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Unassigned | ||
2.12 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen 2.12
In preparing the new hold targeter for deployment (and based on other experiences in the field), I have prepared a set of changes to improve usability and stability of the new targeter.
Here's the list of the changes, comments welcome, branch en route:
* Make the batch targeter more resilient to a single-hold failure.
* Additional batch targeter info logging.
* Ensure all DateTime objects are created with a timezone, using "local" as needed, instead of defaulting to the "floating" time zone, since it's bad practice to compare floating dates with timezone-qualified dates (e.g. from the database).
* Set OSRF_LOG_CLIENT in hold_targeter_v2.pl for log tracing
* Removes the --target-all option
This option is confusingly named and is generally only used for testing purpose. The same behavior can be achieved by setting --reterget-interval "0s"
* Adds a new --next-
Specify how long after the current run time the targeter will retarget the currently affected holds. Applying a specific interval is useful when the retarget_interval is shorter than the time between targeter runs.
For example, if the targeter is run nightly at midnight with a --retarget-interval 36h, you would set --next-
* Replaces the --skip-viable option with a new --soft-
My hope is this terminology "soft targeting" will be easier to understand/explain than "skip viable".
Additionally, the new option allows soft-targeting to occur based on the time since the last target attempt on the hold, instead of a binary on/off flag. This makes is possible to run a single hold targeter instance that treats holds one way or the other depending on how long it's been since the last retarget.
For example:
--retarget-interval 24h --soft-
This would retarget all holds last targeted more then 24 hours ago as usual, but it would soft-retarget holds last targeted between 12 and 24 hours.
SOFT-TARGET NOTES:
1. Soft-targeting only updates prev_check_time if a full retarget is needed on the hold.
2. Soft-targeting updates the hold_copy_maps for all soft-targeted holds, regardless of whether a full retarget is required. With this, the copies used for opportunistic capture can be refreshed more frequently than the hold is retargeted.
3. The original --skip-viable behavior may be replicated by setting the same value for --soft-
Changed in evergreen: | |
milestone: | 2.12.1 → 2.12.2 |
Changed in evergreen: | |
assignee: | nobody → Jason Stephenson (jstephenson) |
Changed in evergreen: | |
milestone: | 2.12.2 → none |
status: | New → Confirmed |
Changed in evergreen: | |
milestone: | none → 2.12.2 |
milestone: | 2.12.2 → 3.0-alpha |
no longer affects: | evergreen/3.0 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Code and release note pushed. Still needs Perl live tests.
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ berick/ lp1677661- hold-targeter- v2-additions