Admin bulk ops
The PDCI calculation was updated in 82c8bf50 yet we don't have an admin method to recalculate PDCI for the entire database.
Implement a system where an action method is provided with Accession
as argument that does "something". This method is invoked by a thread pool worker that receives a batch of accession records loaded from the database based on AccessionFilter
.
Use case
Update PDCI for ICARDA: provide appropriate accession filter that loads records in batches of 1000 and recalculates and updates the PDCI for each accession.
We need to be in a separate transaction so that entity manager is appropriately cleared after each batch.