예제 #1
0
파일: base.py 프로젝트: bubbas/indico
    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()
예제 #2
0
파일: base.py 프로젝트: arturodr/indico
    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()
예제 #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)
예제 #4
0
파일: agent.py 프로젝트: ferhatelmas/indico
 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)