The only thing I can say about actions that are triggered by CRUD operations, is that we should always try to make them async, so they don't make Koha slow. On that regard, I wrote a task queue on a plugin I recently work, so the hooks (in this case on circ operations) only store entries on the plugin's task queue table [1]. That's one possible approach. That said, now that we have a real task queue, we could invest some time making it easy for Koha's task queue to route actions to plugin methods, so we take advantage of the built-in koha worker(s). So instead of just hooks that call a method, we could think of plugins that register themselves to be notified of a list of actions in Koha, and have the worker resolve the call to the right method. This last proposal would of course be for 20.11+, for older versions, I stand with my first approach. My 2 cents! [1] https://gitlab.com/thekesolutions/plugins/koha-plugin-innreach/-/blob/master... El vie., 20 nov. 2020 a las 12:19, Eric Bégin (<eric.begin@inlibro.com>) escribió:
Thanks for this update Frido !
We are planning to use hooks to interact with external systems on patron modifications.
Basically, here what we are planning to implement :
- Send updates to an external system when patron information is changed. - Let the external system know when restrictions change on a patron account.
Does anybody feels that could be useful ?
Any heads-up on the implementation ?
I just create this bugizlla : https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066 Thanks,
Eric
Le 2020-11-20 à 09 h 43, Fridolin SOMERS a écrit :
Hi,
I've worked on : https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks
Should be update with current hooks in master, and a few under development.
Please update this page when developing/integrating a new hook.
Best regards.
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
-- Tomás Cohen Arazi Theke Solutions (http://theke.io) ✆ +54 9351 3513384 GPG: B2F3C15F