watcher
watcher copied to clipboard
Run watcher script only once per interval in pipe mode
Currently the-cmd
script is run once for each event, even when -pipe=true
is specified.
It would be great if there were an option to send all events from a single interval to the cmds stdin in one call, so that the cmd can do batch processing.
Another option would be to start the command only once and contiously feed new events to it's stdin and only restart it if it exits.
@felixbuenemann, sorry for the late response!
One solution to this and some other issues/requests that have come up which I've thought about introducing sometime is pre/post function hooks in the watching cycle. Will keep you updated if I add them in!
Feel free to submit any pull requests in the meantime as well if you'd like :)