コード例 #1
0
ファイル: filter.py プロジェクト: adamnemecek/FileRock-Client
 def __init__(self, operationQueue, resultsQueue, maxWorker, cfg, warebox):
     """
     @param operationQueue: the input queue, cryptoFilter reads the new tasks from it
     @param resultsQueue: the output queue, the managed tasks will be sent back through it
     @param maxWorker: the maximum number of workers running at the same time
     @param cfg: an instance of ConfigurationManager
     @param warebox: an instance of Warebox class
     """
     AbstractFilter.__init__(self, operationQueue, resultsQueue, maxWorker, name=self.__class__.__name__)
     self.logger = logging.getLogger('FR.%s' % self.getName())
     self.cfg=cfg
     self.enc_dir=CryptoUtils.get_encryption_dir(cfg)
     self.warebox = warebox
コード例 #2
0
 def __init__(self, operationQueue, resultsQueue, maxWorker, cfg, warebox, lockfile_fd):
     """
     @param operationQueue: the input queue, cryptoFilter reads the new tasks from it
     @param resultsQueue: the output queue, the managed tasks will be sent back through it
     @param maxWorker: the maximum number of workers running at the same time
     @param cfg: an instance of ConfigurationManager
     @param warebox: an instance of Warebox class
     @param lockfile_fd:
                 File descriptor of the lock file which ensures there
                 is only one instance of FileRock Client running.
                 Child processes have to close it to avoid stale locks.
     """
     AbstractFilter.__init__(self, operationQueue, resultsQueue, maxWorker, name=self.__class__.__name__)
     self.logger = logging.getLogger('FR.%s' % self.getName())
     self.cfg=cfg
     self.enc_dir=CryptoUtils.get_encryption_dir(cfg)
     self.warebox = warebox
     self.lockfile_fd = lockfile_fd
コード例 #3
0
ファイル: filter.py プロジェクト: bryant1410/FileRock-Client
 def __init__(self, operationQueue, resultsQueue, maxWorker, cfg, warebox,
              lockfile_fd):
     """
     @param operationQueue: the input queue, cryptoFilter reads the new tasks from it
     @param resultsQueue: the output queue, the managed tasks will be sent back through it
     @param maxWorker: the maximum number of workers running at the same time
     @param cfg: an instance of ConfigurationManager
     @param warebox: an instance of Warebox class
     @param lockfile_fd:
                 File descriptor of the lock file which ensures there
                 is only one instance of FileRock Client running.
                 Child processes have to close it to avoid stale locks.
     """
     AbstractFilter.__init__(self,
                             operationQueue,
                             resultsQueue,
                             maxWorker,
                             name=self.__class__.__name__)
     self.logger = logging.getLogger('FR.%s' % self.getName())
     self.cfg = cfg
     self.enc_dir = CryptoUtils.get_encryption_dir(cfg)
     self.warebox = warebox
     self.lockfile_fd = lockfile_fd