diff options
author | Victor Shyba <victor.shyba@gmail.com> | 2015-10-01 15:07:25 -0300 |
---|---|---|
committer | Victor Shyba <victor.shyba@gmail.com> | 2015-11-03 12:20:03 -0300 |
commit | b0557f9c1d5e6f153f926ba3cb5876453ef23a10 (patch) | |
tree | 9179ce7f57e4298fe517606d0368b0e9f53ed30a /server | |
parent | 983644df965b391527fce51bda6f6b1f4b29c2ac (diff) |
[refactor] separate SoledadBackend from CouchDatabase
CouchDatabase was renamed to SoledadBackend and a new class
CouchDatabase was created to hold all couchdb code. This should make
SoledadBackend less tied to database implementation. A few more
separations are needed to split into modules.
Diffstat (limited to 'server')
-rwxr-xr-x | server/pkg/create-user-db | 4 | ||||
-rw-r--r-- | server/src/leap/soledad/server/sync.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/server/pkg/create-user-db b/server/pkg/create-user-db index ae5d15dc..a8ba3833 100755 --- a/server/pkg/create-user-db +++ b/server/pkg/create-user-db @@ -19,7 +19,7 @@ import os import sys import netrc import argparse -from leap.soledad.common.couch import CouchDatabase +from leap.soledad.common.couch import SoledadBackend from leap.soledad.common.couch import is_db_name_valid from leap.soledad.common.couch import list_users_dbs from leap.soledad.server import load_configuration @@ -69,7 +69,7 @@ def ensure_database(dbname): sys.exit(1) url = url_for_db(dbname) db_security = CONF['database-security'] - db = CouchDatabase.open_database(url=url, create=True, + db = SoledadBackend.open_database(url=url, create=True, replica_uid=None, ensure_ddocs=True, database_security=db_security) print ('success! Ensured that database %s exists, with replica_uid: %s' % diff --git a/server/src/leap/soledad/server/sync.py b/server/src/leap/soledad/server/sync.py index 92b29102..db25c406 100644 --- a/server/src/leap/soledad/server/sync.py +++ b/server/src/leap/soledad/server/sync.py @@ -32,7 +32,7 @@ class SyncExchange(sync.SyncExchange): def __init__(self, db, source_replica_uid, last_known_generation, sync_id): """ :param db: The target syncing database. - :type db: CouchDatabase + :type db: SoledadBackend :param source_replica_uid: The uid of the source syncing replica. :type source_replica_uid: str :param last_known_generation: The last target replica generation the |