[Koha-devel] Thoughts on reloading Koha plugins

dcook at prosentient.com.au dcook at prosentient.com.au
Wed May 26 02:10:32 CEST 2021


Hi all,

 

It seems to me that installing Koha plugins is easy enough. Each Starman
process will load the plugin into memory because it hasn't seen it before. 

 

However, if you're updating/upgrading a plugin, each Starman process has
already loaded it, so it won't know that it needs to reload it. I think most
of us work around this at the moment either by restarting Plack or just
letting the Starman workers die and be replaced by new ones that use the
updated code. But that doesn't seem optimal for an environment that allows
user plugins.

 

That said,
https://advent.plackperl.org/2009/12/day-4-reloading-applications.html and
https://metacpan.org/pod/Module::Reload have a few points on how reloading
code in a persistent process is a good way to get bugs. 

 

I recall Kyle saying Wordpress was his inspiration for the plugins. I'm
curious how Wordpress handles plugin upgrades. 

 

David Cook

Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20210526/722b33d9/attachment.htm>


More information about the Koha-devel mailing list