Task #2992
closedAdd support for skipping automatic role recalculation in SaveAllNodesForSubtreeExecutor
100%
Description
Calculating automatic roles on each contract save becomes very slow when there is a lot of automatic role rules. It is more beneficial to skip calculating these roles and schedule automatic role recalculation separately after tree node sync is finished.
Also, it would be better to implement this lrt as a stateful task so that we can see which contracts are being processed.
Updated by Peter Štrunc about 3 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 70
Updated by Peter Štrunc about 3 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Peter Štrunc to Tomáš Doischer
- % Done changed from 70 to 80
Implementation is here https://github.com/bcvsolutions/czechidm-extras/commit/749e9c209d6cb83b458d59c38738c3f4fb2475dc
Documentation is here https://wiki.czechidm.com/tutorial/adm/automatic-roles-structure-and-attribute#turning_off_automatic_role_recalculation
@doischert would you please review these changes?
Updated by Tomáš Doischer about 3 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Tomáš Doischer to Peter Štrunc
Thanks for this. I only did code review (no testing) but the test looks good. I found only minor issues:
- supportQueue needs to be overriden to false
- documentation does not really say what the whole feature is for
- localization is missing for LRTs (and result code - but it is probably not needed) - I know that this will likely not be ran manually but it will be shown among other tasks
The code looks good otherwise.
Updated by Peter Štrunc about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Thanks @doischert, I added localization and disabled queue for these tasks.