[Koha-bugs] [Bug 31729] Enable automatic filesystem refresh in Plack

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sun Mar 26 15:53:45 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31729

Mason James <mtj at kohaaloha.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #148600|0                           |1
        is obsolete|                            |
 Attachment #148603|0                           |1
        is obsolete|                            |
 Attachment #148606|0                           |1
        is obsolete|                            |
 Attachment #148613|0                           |1
        is obsolete|                            |

--- Comment #30 from Mason James <mtj at kohaaloha.com> ---
Created attachment 148720
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148720&action=edit
Bug 31729: Enable automatic filesystem refresh in Plack

to test (on KTD)

- install inotify-tools
  $ sudo apt install inotify-tools

- apply patch
  $ git bz apply 31729

- manually install files and set perms
  $ cd /kohadevbox/koha
  $ sudo cp debian/scripts/koha-plack   /usr/sbin
  $ sudo cp debian/scripts/koha-watcher /usr/sbin
  $ sudo chmod 755 /usr/sbin/koha-plack
  $ sudo chmod 755 /usr/sbin/koha-watcher

- restart, with --watch arg
  $ sudo koha-plack --restart --watch kohadev

- observe koha-watch process
  $ ps -ef | grep koha-watcher | grep -v grep | wc -l
  3

- modify some perl files in watched dir
  $ echo `date` >  /kohadevbox/koha/xxx.pl
  $ echo `date` >  /kohadevbox/koha/xxx.pm

- see HUP/inotify messages in log file
  $ tail -f /var/log/koha/kohadev/plack-watcher.log
  CLOSE_WRITE,CLOSE event on /kohadevbox/koha/xxx.pl
  CLOSE_WRITE,CLOSE event on /kohadevbox/koha/xxx.pm
  koha-plack reloaded

- add syntax error to file in watched dir
  $ echo `date` > /kohadevbox/koha/C4/Context.pm

- see HUP/inotify messages in log file
  $ tail -f /var/log/koha/kohadev/plack-watcher.log
  CLOSE_WRITE,CLOSE event on /kohadevbox/koha/C4/Context.pm
  koha-plack failed! sleeping 2 secs
  koha-plack failed! sleeping 3 secs
  koha-plack failed! sleeping 4 secs
  ...
  koha-plack failed! sleeping 10 secs

- fix syntax error in file in watched dir
  $ git checkout /kohadevbox/koha/C4/Context.pm

- see HUP/inotify messages in log file
  $ tail -f /var/log/koha/kohadev/plack-watcher.log
  CLOSE_WRITE,CLOSE event on /kohadevbox/koha/C4/Context.pm
  koha-plack reloaded ok

- stop koha-plack
  $ sudo koha-plack --stop kohadev

- observe no koha-watch process
  $ ps -ef | grep koha-watcher | grep -v grep | wc -l
  0

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list