FOLIO-FSE / folio_migration_tools

A Python module and CLI tool that transforms legacy ILS data into the native FOLIO formats and loads it into FOLIO
MIT License
11 stars 8 forks source link

Sync blocks after loan migration #788

Open banerjek opened 1 month ago

banerjek commented 1 month ago

A huge percentage of the time, the loan migration process ends with a lot of spurious blocks that must be cleared via a call to /automated-patron-blocks/synchronization/job

This happens often enough that seems worthwhile to just automatically launch this after a loans migration process

bltravis commented 1 month ago

@banerjek Launch and continue, or launch and wait?

banerjek commented 1 month ago

Launch and continue -- I wouldn't bother to monitor/verify it.

If it failed for some reason and there were affected users, manual intervention would be necessary anyway. No need to add additional overhead

bltravis commented 1 month ago

I will note that this can be an "expensive" process, depending on how many transactions are present in the system.

banerjek commented 1 month ago

I really hated having to suggest this enhancement for precisely that reason, but unfortunately my experience is the number of transactions correlates strongly with improper autoblocks

I have theories that this is more a function of the nature of the transactions that we get when someone sends tens of thousands (or a quarter million as I recently migrated), but the end effect is the same, namely that loan migrations are resulting in autoblocked users so often (and these are inevitably the heaviest users) that I've been needing to do this basically every time

bltravis commented 1 month ago

Automated patron blocks rely on mod-pubsub, which does not have any form of delivery guarantee for published messages. For automated transaction migrations, I suspect the event queue is being overwhelmed.