The --reload option is plackup's/starman's option switch. Jonathan has been trying different ways of developing on a Plack enabled instance. This is only useful for developers.
El lun., 12 sept. 2016 a las 8:53, Paul Poulain (<[email protected]>) escribió: > wow! impressive ! > > Is the option --reload shipped with packages ? Because if I'm not wrong, > it's "useless" in a production environment: you know when you update > your Koha and you can restart plack manually or trough the packages > post-update scripts, isn't it ? > > > Le 09/09/2016 à 16:32, Jonathan Druart a écrit : > > Hi devs, > > > > A couple days ago I found that the --reload option of plackup causes > > a high CPU load (around 35%). If I remove it, the process is around 1% > > (when sleeping). > > So I have tried inotify2 (Linux::Inotify2) to add watchers and restart > > plack when a file is changed. > > But 1/ It's not recursive and I will have to script without knowing > > the perf impacts and 2/ It will be terrible when checking out another > > git branch (1 restart per file changed!). > > > > After a talk with a friend, I decided to use a git hook and map a key > > in my vim config to do so: > > > > The git hook: > > .git/hooks/post-checkout > > #!/bin/sh > > exec /usr/local/bin/restart_plack > > exit 0 > > > > The vim map command: > > map <F2> <Esc>:w<CR>:!(/usr/local/bin/restart_plack > /dev/null > 2>&1)&<CR>a > > > > And that's all :) > > > > To be complete, here is my restart_plack script: > http://pastebin.com/8wFSC4fJ > > > > Cheers, > > Jonathan > > _______________________________________________ > > Koha-devel mailing list > > [email protected] > > http://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/ > > -- > Paul Poulain, Associé-gérant / co-owner > BibLibre, Services en logiciels libres pour les bibliothèques > BibLibre, Open Source software and services for libraries > > _______________________________________________ > Koha-devel mailing list > [email protected] > http://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 (https://theke.io <http://theke.io/>) ✆ +54 9351 3513384 GPG: B2F3C15F
_______________________________________________ Koha-devel mailing list [email protected] http://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/
