Пример #1
0
 def __init__ ( self, tubeName, workingDir = "d:/tmp/working/zippedCollectionListHandler", passwd = '123'):
     misc.ensureDir(workingDir)
     super(zippedCollectionListHandler, self).__init__(tubeName)
     threading.Thread.__init__(self)
     # Stores collection instance for given monitoring path, all zipped objects
     # in this monitoring path will be stored in this collection
     self.collectionInDbForMonitoringPath = {}
     self.dbInst = objectDatabase.objectDatabase()
     self.workingDir = workingDir
     self.encCopier = encryptionStorageBase.arc4EncSimpleCopier(passwd)
     self.decCopier = encryptionStorageBase.arc4DecSimpleCopier(passwd)
     self.zippedInfoCollectionList = collectionDatabase.collectionOnMongoDbBase(gZippedInfoCollectionId, self.dbInst.getCollectionDb())
Пример #2
0
 def __init__ ( self, inputTubeName, storage, zipCollectionRoot = gZipCollectionRoot, passwd = "123"):
     '''
     Constructor
     '''
     super(fileArchiveThread, self).__init__(inputTubeName)
     self.storage = storage
     self.zipCollectionRoot = zipCollectionRoot
     self.encCopier = encryptionStorageBase.arc4EncSimpleCopier(passwd)
     self.decCopier = encryptionStorageBase.arc4DecSimpleCopier(passwd)
     self.curStorageSize = 0
     #self.addedList = []
     #self.fileListTubeName = fileListTubeName
     self.monitoringList = []
     self.dbInst = objectDatabase.objectDatabase()