<div dir="ltr">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.<div><br></div><div>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.</div><div><br></div><div>This last proposal would of course be for 20.11+, for older versions, I stand with my first approach.</div><div><br></div><div>My 2 cents!</div><div><br></div><div>[1] <a href="https://gitlab.com/thekesolutions/plugins/koha-plugin-innreach/-/blob/master/Koha/Plugin/Com/Theke/INNReach.pm#L372-402">https://gitlab.com/thekesolutions/plugins/koha-plugin-innreach/-/blob/master/Koha/Plugin/Com/Theke/INNReach.pm#L372-402</a></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El vie., 20 nov. 2020 a las 12:19, Eric Bégin (<<a href="mailto:eric.begin@inlibro.com">eric.begin@inlibro.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <font face="Helvetica, Arial, sans-serif">Thanks for this update
      Frido !<br>
      <br>
      We are planning to use hooks to interact with external systems on
      patron modifications.<br>
      <br>
      Basically, here what we are planning to implement :<br>
    </font>
    <ul>
      <li><font face="Helvetica, Arial, sans-serif">Send updates to an
          external system when patron information is changed.</font></li>
      <li><font face="Helvetica, Arial, sans-serif">Let the external
          system know when restrictions change on a patron account.</font></li>
    </ul>
    <font face="Helvetica, Arial, sans-serif">Does anybody feels that
      could be useful ?<br>
      <br>
    </font><span><span><span style="color:rgb(125,125,125)"><span>
          </span></span></span></span><span><span><span>Any </span></span></span><span><span><span style="background-image:linear-gradient(0deg,rgb(43,191,84) 100%,rgb(43,191,84) 100%);background-repeat:repeat-x;background-size:8px 2px;background-position:0px 100%;padding-bottom:1px"><span><span><span>heads-up</span></span></span></span></span></span><span><span><span> on the implementation ?</span></span></span>
    <p><font face="Helvetica, Arial, sans-serif">I just create this
        bugizlla :
        <a href="https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066" target="_blank">https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27066</a><br>
      </font></p>
    <font face="Helvetica, Arial, sans-serif">Thanks,<br>
      <br>
      Eric<br>
    </font><br>
    <div>Le 2020-11-20 à 09 h 43, Fridolin
      SOMERS a écrit :<br>
    </div>
    <blockquote type="cite">Hi,
      <br>
      <br>
      I've worked on :
      <br>
      <a href="https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks" target="_blank">https://wiki.koha-community.org/wiki/Koha_Plugin_Hooks</a>
      <br>
      <br>
      Should be update with current hooks in master, and a few under
      development.
      <br>
      <br>
      Please update this page when developing/integrating a new hook.
      <br>
      <br>
      Best regards.
      <br>
      <br>
    </blockquote>
  </div>

_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">Tomás Cohen Arazi</div><div style="font-size:12.8px">Theke Solutions (<a href="http://theke.io/" target="_blank">http://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div></div></div>