def start(self, obj): super(LiveSync_Feature, self).start(obj) with obj._context('database') as conn: obj._ph.getPluginType('livesync').toggleActive() db.updateDBStructures(conn.root._root, granularity=1) obj._sm = SyncManager.getDBInstance()
def getDBInstance(cls): """ Returns the instance of SyncManager currently in the DB """ storage = getPluginType().getStorage() if 'agent_manager' in storage: return storage['agent_manager'] else: root = DBMgr.getInstance().getDBConnection() updateDBStructures(root)