couchdb.tools.replication_helper

Package couchdb :: Package tools :: Module replication_helper |

# Module replication_helper

CouchDB `update_notification` script that triggers replication.

Daemon script that can be used as a CouchDB `update_notification` process and triggers replication on each incoming database update between the specified servers.

Setup: Add this to your local.ini, in the section `[update_notification]`:

    replication = /path/to/couchdb-replicate \
      --source-server=http://127.0.0.1/ \
      --target-server=http://127.0.0.1:5985/

Format of the messages it reads:

    {"db":"replication_notification_test","type":"updated"}

TODO:
  - Generic'-out the listener part and implement the resplication trigger as a delegate or subclass.
  - Check if sub-second sleep delays are possible

Classes
| ReplicationHelper Listener daemon for CouchDB database notifications

Functions
main() |

Variables
| log = `logging.getLogger('couchdb.tools.replication_helper')`
| URLSPLIT_RE = `re.compile(r'`(?x)``(?P<``scheme``>`https`?`://`)``(``(?P<``usern``...``
| __package__ = ``'``couchdb.tools``'``

Variables Details

  ### URLSPLIT_RE Value:
      re.compile(r'(?x)(?P<scheme>https?://)((?P<username>.*):(?P<password>.
      *)@)?(?P<host>.*)')