3

It seems changes are not updated when I change files using rsync. I have this rsync script:

DEST1="/home/user/odoo8/addons"
DEST2="/home/user/odoo8/addons-bckp"
SRC="/home/user/odoo8/source/***/*"

for DEST in $DEST1 $DEST2; do
    rsync -av --exclude='.git' $SRC $DEST
done

I'm running Odoo server with an option --auto-reload which lets update python and xml files without having to restart server. If I modify files inside /home/user/odoo8/addons/, then it updates even if I don't restart the server. But if I modify antyhing in source directory, then do rsync to push changes to /home/user/odoo8/addons/, changes are not updated. And it only updates if I restart the server.

Does pyinotify not work if you 'overwrite' files? For example, like using rsync?

Andrius
  • 19,658
  • 37
  • 143
  • 243
  • i'm facing the same problem. Did you find any solution with rsync? Right now the only solution i can think of is to stop the odoo service. and then write a `git hook` that extracts the `module_name` from the commit message, and then when starting the service again i can just pass `-u extracted_module_name`. But that's a last-ditch option if i can't find any solution. – danidee Feb 09 '17 at 12:20
  • I've encountered this as well with pyinotify version 0.9.3-1.1 when writing my own file-monitoring program. As a workaround, I'm using IN_ATTRIB (mask 0x4) rather than IN_MODIFY (mask 0x2) to detect file changes. It detects when modification timestamps are changed, which suits my application just as well. – Stenis Feb 02 '18 at 10:30

0 Answers0