Esempio n. 1
0
class UserMgr():

    def __init__(self, mainDir):
        self.__userStore = UserStore(mainDir)
        self.__urlResolverMgr = UrlSyncResolverManager(os.path.join(mainDir, "urlResolverCache.db2"))
        self.__urlResolverMgr.start()

    def doJob(self, token, userId, stoppable, screenName=None):
        return UserFeatures(self.__userStore, self.__urlResolverMgr, userId, screenName, token, stoppable)

    def close(self):
        self.__urlResolverMgr.stop()
        self.__userStore.close()
Esempio n. 2
0
 def __init__(self, mainDir):
     self.__userStore = UserStore(mainDir)
     self.__urlResolverMgr = UrlSyncResolverManager(os.path.join(mainDir, "urlResolverCache.db2"))
     self.__urlResolverMgr.start()