Skip to content

Changes Worker Pattern

Chris Anderson edited this page May 3, 2013 · 5 revisions

Pattern: Changes Worker

If you connect to a changes feed of some channels, you'll get lines of JSON for each matching change.

Now you can write a script to consume these channels and take action based on them. For instance if you have a channel called "needs-email" you could have a bot that sends an email and then saves the document back with a flag to keep it out of the needs-email channel.

Clone this wiki locally