watcher icon indicating copy to clipboard operation
watcher copied to clipboard

Run watcher script only once per interval in pipe mode

Open felixbuenemann opened this issue 7 years ago • 2 comments

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.

felixbuenemann avatar Oct 22 '17 19:10 felixbuenemann

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 avatar Oct 22 '17 19:10 felixbuenemann

@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 :)

radovskyb avatar Apr 03 '18 10:04 radovskyb