Repository navigation
CIRC-2699 Resync anonymization preferences nightly - #1709
Conversation
- Nightly timer fetches users with a preference from mod-users - Pages by id, so no user is skipped - Writes only after all pages were fetched - Replaces the copy in mod-circulation-storage
688dc04 to
cf62ae0
Compare
--> Shouldn't that be a preference the admins could set. It depends heavily on your timezone when "nightly" is right? So for some libraries this could run at the middle of the day, which might not be preferable, right? |
--> One question here: Is this a blocking operation, so the whole system is unresponsive for the time this is running, or does this run asynchronously in the background? |
|
Regarding your questions:
|
charismatic-claire
left a comment
There was a problem hiding this comment.
I basically have questions and have some code style improvements suggested. Let me know what you think :)
|
| } | ||
|
|
||
| private CompletableFuture<Result<List<UserLoanAnonymizationPreference>>> | ||
| fetchAllUserSpecificPreferences(String afterId, List<UserLoanAnonymizationPreference> fetched) { |
There was a problem hiding this comment.
That's weirdly formatted. Is there an auto-formatter we could run?
There was a problem hiding this comment.
Nothing I know of. No spotless etc. Will indent the line manually though.
There was a problem hiding this comment.
👍 Lame there isn't an formatter / linter.
|



CIRC-2699
Part of UXPROD-5562
Design page
Requires folio-org/mod-circulation-storage#606 (interface
loan-anonymization-preference-storage1.0).Purpose
The preference table in mod-circulation-storage is kept in sync via Kafka events. In some rare cases these Kafka events might not be registered. Then loans could be anonymized against the user's choice, which can't be undone. A nightly resync updates the table from mod-users in case these really rare edge cases occur.
Open questions
Approach
usersrequirement stays14.2 15.0 16.0, although the field only exists sinceusers16.6 (MODUSERS-600): against an older mod-users the query finds nobody and the table is emptied, which is correct there, as no user can have a preference.