-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore queued events #45
Comments
@mojavelinux interesting request! I'm open to adding something like this, but I have no idea how to name the option or how it would interact with the |
I'd definitely be opening to following up my request with code. I'll have to give the option name some thought. My first instinct is to call it |
I think we could achieve this by introducing a |
Looking through the code really quick - I think there's two possible modes here, we could do one of them or both:
One other option is no API change or addition, instruct users to call As a work-around until we figure out a solution, if you're using the EventEmitter to call your function you can always remove your event listener when your process starts, then add the event listener back when finished. |
I don't think it's ideal to have people using the watcher directly because we normalize the watch callbacks to match our async handling - this was a huge QoL improvement in gulp 4. Returning the watcher was really just provided as an escape hatch for people that need to inspect file paths for some reason. I did some rough sketching on making my "queueing" logic an instance so people can inherit/modify from it. |
Is it possible to configure glob-watcher to ignore all queued events?
The idea is to run a process when a change is detected, but ignore events that happen while the process is still running. Then, when the process is done, begin accepting events again. Is that possible with glob-watcher?
If that's not in scope, just let me know so I know to look elsewhere.
The text was updated successfully, but these errors were encountered: