Commit be113e13 authored by Sriram Karra's avatar Sriram Karra

--op=sync now works with the Collection chnages. Many db specific mods remain

parent 1959347c
......@@ -56,8 +56,8 @@ class Sync:
logging.debug('fid2 : %s', fid2)
logging.debug('db1id : %s', self.get_db1id())
db1 = self.get_db(self.get_db1id())
db2 = self.get_db(self.get_db2id())
db1 = self.get_db(0)
db2 = self.get_db(1)
logging.debug('db : %s', db1)
......@@ -59,7 +59,7 @@ class Asynk:
self.alogger = alogger
if level and level != 'INFO':
consoleLogger.setLevel(getattr(logging, level))
alogger.consoleLogger.setLevel(getattr(logging, level))
......@@ -631,7 +631,8 @@ class Asynk:
logging.debug('Temporarily resetting last sync times...')
conf.set_last_sync_start(pname, val=utils.time_start)
conf.set_last_sync_stop(pname, val=utils.time_start)
sync = Sync(conf, pname, self.get_db(), dr=self.is_dry_run())
sync = Sync(conf, pname, [x.get_db() for x in self.get_colls()],
if self.is_dry_run():
# Since it is only a dry run, resetting to the timestamps to the
......@@ -718,19 +719,6 @@ class Asynk:
def get_colls (self):
return self.colls
def set_db (self, dbid=None, val=None):
if not dbid:
self.dbs = {}
self.dbs.update({dbid : val})
def get_db (self, dbid=None):
if not dbid:
return self.dbs
if dbid in self.dbs:
return self.dbs[dbid]
## WIP: To be removed after move to Collections
def get_db1 (self):
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment