filewatcher: Delay for triggering
Hello!
filewatcher has an --interval option.
But it’s only for files check.
I have a problem: massive files changes by git (for example), when many-many files are changed, or added, or anything else, and in the same time filewatcher is working — it’s begin triggering shell command many-many times.
Using with --restart.
--interval doesn’t help.
We need for a code (or option) about trigger delay: for example, if any (watched) file has been changed — trigger shell command and wait 100–300 ms (for example) before next triggering.
Or, may be, don’t collect collection of changed files, and trigger only by first.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 24 (15 by maintainers)
Commits related to this issue
- Rename `dontwait` option to `immediate` Preparations for #46 — committed to AlexWayfer/filewatcher by AlexWayfer 7 years ago
- Fix event names (types) I propose to adhere to this terminology: What happend | Event ----------------------|----------- New file found | `created` Known file changed | `updated... — committed to AlexWayfer/filewatcher by AlexWayfer 7 years ago
- Fix event names (types) I propose to adhere to this terminology: What happend | Event ----------------------|----------- New file found | `created` Known file changed | `updated` ... — committed to AlexWayfer/filewatcher by AlexWayfer 7 years ago
- Add `--every` option, change default behavior, resolve #46 Also: * Filewatcher lib now returns `changes` Hash(filename => event) into `watch` block. * Many refactorings, less RuboCop warnings. — committed to AlexWayfer/filewatcher by AlexWayfer 7 years ago
- Add `--every` option, change default behavior, resolve #46 Also: * Filewatcher lib now returns `changes` Hash(filename => event) into `watch` block. * Many refactorings, less RuboCop warnings. — committed to AlexWayfer/filewatcher by AlexWayfer 7 years ago
- Merge pull request #53 from AlexWayfer/improve-event-of-changes WIP: Add `--every` option, change default behavior, resolve #46 — committed to filewatcher/filewatcher by thomasfl 7 years ago
Yes, let’s do it!
@thomasfl I’d like to decide about the variables, maybe they need some changes with new behavior.
And today I thought of a slightly better scheme of work for
--delayoption, I’ll create a new PR.I support this decision!
👍
I think the best way to tackle this is to do what a similar js cli tool called watch does:
https://github.com/mikeal/watch
@gisikw You’ve been engaged in the same problem recently. Any comments?
If we add a --wait option then the --dontwait option should probably be renamed to --immediate to avoid confusion.