Open KES777 opened 9 years ago
Monitoring directories is basically impossible in a "scanning" context, it would mean recursing over them every second. The --fs-reload facility works over inotify/kqueue but cannot be applied in the module scanner as it is not event based.
Maybe for-glob can be useful (albeit limited to a single depth):
[uwsgi]
for-glob = /home/user/public_html/logs/*.pm
perl-auto-reload-ignore = %(_)
endfor =
Single depth is not usefull as I need. Because of I do not know the resulting dir tree. This is small part of auto generated %INC
"/home/user/public_html/lib/MasonHandler.psgi" => "/home/user/public_html/lib/MasonHandler.psgi",
"/home/user/public_html/www/../logs/masonobj/obj/2460409036/autohandler.obj" => "/home/user/public_html/www/../logs/masonobj/obj/2460409036/autohandler.obj",
"/home/user/public_html/www/../logs/masonobj/obj/2460409036/customers/autohandler.obj" => "/home/user/public_html/www/../logs/masonobj/obj/2460409036/customers/autohandler.obj",
"/home/user/public_html/www/../logs/masonobj/obj/2460409036/customers/dhandler.obj" => "/home/user/public_html/www/../logs/masonobj/obj/2460409036/customers/dhandler.obj",
This will be very usefull:
[uwsgi]
perl-auto-reload-ignore = /*.obj/
When you loop over %INC you can compare item to given regex and do not subscribe that file for inotify if matching is true.
So you are proposing to match by regexp instead of exact path string ? it could work (and it would not be too heavy), feel free to make a pull request
No problem. I am not full comprehend with C, but If you point where I need to patch and I have time I will do.
I have
perl-auto-reload-ignore = /home/user/public_html/logs
but in log messages I still get:
Sat Sep 12 15:16:01 2015 - [perl-auto-reloader] /home/user/public_html/www/. ./logs/masonobj/obj/2460409036/autohandler.obj has been modified !!!