On Thu, Jun 23, 2011 at 9:06 AM, Jason Smith <[email protected]> wrote: > I suggest the following technique: > > 1. Keep track of what `seq` you've seen, perhaps initially 0 > 2. Query _changes, with a heartbeat, and &seen=$seq_Ive_seen > 3. Set a timer for heartbeat * 1.1, or heartbeat + 5 seconds, or similar > 4 .Keep a *second* timer, the change deadline. Set this relatively long. > 5. Every time you receive data, reset the heartbeat timer > 6. If the heartbeat timer fires, stop your query, go to step 2 > 7. If the deadline timer fires, stop your query, alert a human. Go to > step 2 (or maybe exit)
Whoops, step 5.5: Every time you receive a change, reset the deadline timer. -- Iris Couch
