diff --git a/README.md b/README.md index 67e94f2..65c86c4 100644 --- a/README.md +++ b/README.md @@ -7,11 +7,11 @@ It's a [fairly well known limitation that doesn't have a fix at the moment](http If it's a really lightweight item - no problem - but if it's not so lightweight - then it can be a bit of a problem. -If you take a look at what the watch passes on STDIN - you will see that if it's not actually firing it just passes: +If you take a look at what the watch passes on STDIN during a Consul reload - you will see that if it's not actually firing it just passes: `[]\n` -So - `sifter` is a small Go binary that helps protect against watches firing when they shouldn't: +So - `sifter` is a small Go binary that helps protect against event watches firing repeatadly: ``` { @@ -27,10 +27,18 @@ So - `sifter` is a small Go binary that helps protect against watches firing whe When this gets loaded into Consul - instead of launching copies and copies of `chef-client` processes - which is not awesome I promise - it will just say: -`stdin='blank' NOT running 'chef-client'` +`location='blank' elapsed='226.912µs' exec='chef-client'` When you actually send the event - the logs will show this - and the event will fire: -`stdin='[{"ID":"long-semi-random-uuid-goes-here","Name":"chef-client","Payload":null,"NodeFilter":"","ServiceFilter":"service-name","TagFilter":"consul-server","Version":1,"LTime":1137}]' exec='chef-client'` +``` +decoded event='chef-client' ltime='1137' +key='sifter/chef-client/i-c972d41e' value='1137' +location='complete' elapsed='47.448987142s' exec='chef-client' +``` + +Afterwards - if it sees the same event: + +`location='duplicate' elapsed='8.269276ms' exec='chef-client'` This is just an hour long hack - it doesn't do much - just wanted to see if this would work.