Exemple #1
0
    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()
Exemple #2
0
    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()
Exemple #3
0
 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)
Exemple #4
0
 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)