Logo Search packages:      
Sourcecode: hellanzb version File versions  Download package

def Hellanzb::PostProcessor::PostProcessor::__init__ (   self,
  background = True,
  subDir = None 

Ensure sanity of this instance before starting 

Definition at line 38 of file PostProcessor.py.

00038                                                                  :
        """ Ensure sanity of this instance before starting """
        # The archive to post process
        self.archive = archive
        # DirName is a hack printing out the correct directory name when running nested
        # post processors on sub directories
        if subDir:
            # Make a note of the parent directory the originating post process call
            # started from
            self.isSubDir = True
            self.subDir = subDir
            self.dirName = DirName(pathjoin(archive.archiveDir, self.subDir))
            self.dirName.parentDir = archive.archiveDir
            self.isSubDir = False
            self.dirName = DirName(archive.archiveDir)
            self.archive.postProcessor = self

        self.nzbFileName = None
        if self.isNZBArchive():
            self.nzbFileName = archive.nzbFileName

        # Whether or not this thread is the only thing happening in the app (-Lp mode)
        self.background = background
        # If we're a background Post Processor, our MO is to move dirName to DEST_DIR when
        # finished (successfully or not)
        self.movedDestDir = False

        # Whether all par data for the NZB has not been downloaded. If this is True,
        # and par fails needing more data, we can trigger a download of extra par dat
        self.hasMorePars = False
        if self.isNZBArchive() and self.archive.skippedParSubjects:
            self.hasMorePars = True
        self.decompressionThreadPool = []
        self.decompressorLock = RLock()
        self.decompressorCondition = Condition(self.decompressorLock)

        self.movedSamples = []
        self.startTime = None

        # Whether or not this PostProcessor's Topen processes were explicitly kill()'ed
        self.killed = False

        # Whether or not this post processor will call back to the twisted thread to force
        # a par recovery download
        self.forcedRecovery = False
        # Function to call the twisted thread to force a par recovery download
        self.callback = None

    def __getattr__(self, name):

Generated by  Doxygen 1.6.0   Back to index