I am wondering, why is there a loop here? Isn't the shell script
called once every time the database receives an update? That is what
I can read out of the documentation for the
DbUpdateNotificationProcess in the wiki...
Couldn't it just as well be written like this?
#!/bin/sh
read database
`curl http://server:5984/$database/_view/one_for_each/view?count=0`
`curl http://server:5984/$database/_view/other_view/jadijadd?count=0`
What is it I am not understanding?
A little testing made me understand why it can't be written like this...
The script is called and just runs in the background waiting for input
from the user... so the loop is obviously there to keep it alive...
And the counter to ensure the script only gets called once for every
hundred changed documents... well... now it makes sense to me :)
Best regards
Sebastian