tail query works like original sigmon.py from couchdb