<div dir="ltr">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.</div><br><div class="gmail_quote"><div dir="ltr">El lun., 12 sept. 2016 a las 8:53, Paul Poulain (<<a href="mailto:paul.poulain@biblibre.com">paul.poulain@biblibre.com</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">wow! impressive !<br>
<br>
Is the option --reload shipped with packages ? Because if I'm not wrong,<br>
it's "useless" in a production environment: you know when you update<br>
your Koha and you can restart plack manually or trough the packages<br>
post-update scripts, isn't it ?<br>
<br>
<br>
Le 09/09/2016 à 16:32, Jonathan Druart a écrit :<br>
> Hi devs,<br>
><br>
> A couple days ago I found  that the --reload option of plackup causes<br>
> a high CPU load (around 35%). If I remove it, the process is around 1%<br>
> (when sleeping).<br>
> So I have tried inotify2 (Linux::Inotify2) to add watchers and restart<br>
> plack when a file is changed.<br>
> But 1/ It's not recursive and I will have to script without knowing<br>
> the perf impacts and 2/ It will be terrible when checking out another<br>
> git branch (1 restart per file changed!).<br>
><br>
> After a talk with a friend, I decided to use a git hook and map a key<br>
> in my vim config to do so:<br>
><br>
> The git hook:<br>
> .git/hooks/post-checkout<br>
> #!/bin/sh<br>
> exec /usr/local/bin/restart_plack<br>
> exit 0<br>
><br>
> The vim map command:<br>
> map <F2> <Esc>:w<CR>:!(/usr/local/bin/restart_plack > /dev/null 2>&1)&<CR>a<br>
><br>
> And that's all :)<br>
><br>
> To be complete, here is my restart_plack script: <a href="http://pastebin.com/8wFSC4fJ" rel="noreferrer" target="_blank">http://pastebin.com/8wFSC4fJ</a><br>
><br>
> Cheers,<br>
> Jonathan<br>
> _______________________________________________<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="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://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>
<br>
--<br>
Paul Poulain, Associé-gérant / co-owner<br>
BibLibre, Services en logiciels libres pour les bibliothèques<br>
BibLibre, Open Source software and services for libraries<br>
<br>
_______________________________________________<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="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://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><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div style="color:rgb(117,117,117);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:12.8px">Tomás Cohen Arazi</div><div style="color:rgb(117,117,117);font-family:'helvetica neue',helvetica,arial,sans-serif;font-size:12.8px">Theke Solutions (<a href="http://theke.io/">https://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div>