Home | Trees | Indices | Help |
---|
|
object --+ | Consumer
Database change consumer
Example Usage:
>>> from couchdbkit import Server, Consumer >>> s = Server() >>> db = s['testdb'] >>> c = Consumer(db) >>> def print_line(line): ... print "got %s" % line ... >>> c.wait(print_line,since=0) # Go into receive loop
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
Inherited from |
|
Constructor for the consumer Args: @param db: Database instance @param backend: backend entry point uri The default class (sync) erialize each call to registered callbacks. Line processing should be fast in this case to not wait on socket read. A string referring to one of the following bundled classes: * ``sync`` * ``eventlet`` - Requires eventlet >= 0.9.7 * ``gevent`` - Requires gevent >= 0.12.2 (?) You can optionnaly register in ``couchdbkit.consumers``entry point your own worker.
|
Fetch all changes and return. If since is specified, fetch all changes since this doc sequence Args:
|
Wait for one change and return (longpoll feed) Args:
|
Wait for changes until the connection close (continuous feed) Args:
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri May 4 11:48:40 2012 | http://epydoc.sourceforge.net |