Add the --watchIgnore option to the cli #403

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants
Contributor

kerphi commented Apr 7, 2013

When --watch is enabled, it was not possible to ignore files or directories. The option --watchIgnore will setup the --watchIgnorePatterns parameter to forever-monitor.

Usage example:
--watchIgnore ".log" --watchIgnore ".pid" --watchIgnore "tmp/"

bfricka commented Apr 7, 2013

👍

@indexzero indexzero closed this in b641a4a Apr 21, 2013

This doesn't seem to work at this moment, is that correct? When I use forever -wa app.js --watchIgnore "*.png" --watchIgnore "*.jpg" --watchIgnore "*.jpeg" --watchIgnore "*.gif" it will still reboot after files of these types get uploaded.

Contributor

kbackowski commented Jul 9, 2013

It doesn't work since watchIgnore pattern is incorrectly assigned. I've fixed this in #423 but it's still not merged :(

Damn... Will try with .foreverignore for now then...

Contributor

kbackowski commented Jul 9, 2013

For me .foreverignore doesn't work either. I think it's going through the same path and both options are being incorrectly assigned ...

I had that too. Stupid, makes forever pretty much useless for production if you have file uploads.

askie commented Oct 25, 2013

This doesn't seem to work at this moment, is that correct? When I use forever -wa app.js --watchIgnore ".png" --watchIgnore ".jpg" --watchIgnore ".jpeg" --watchIgnore ".gif" it will still reboot after files of these types get uploaded.

This seems to still be broken. This makes forever with -watch completely useless for anything that does stuff like generating cached versions of a site for performance. I'm using https://github.com/balderdashy/sails/ but can't use forever's -watch because it goes into an infinite loop of restarting due to not being able to ignore the .tmp/ directory that gets generated by sails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment