def execute( self, keepGoing, threadNumber ): if threadNumber == -1: try: threadNumber = multiprocessing.cpu_count() + 1 except NotImplementedError: threadNumber = 2 Log.verbose( "Automatically using", threadNumber, "jobs" ) self.__prepareExecution() self.__executeInThreads( keepGoing, threadNumber ) self.__checkExecution()
def executeWithContext( self, context, args ): action = context.project.getBuildAction( assumeNew = self.assumeNew, assumeOld = self.assumeOld, touch = self.touch ) # @todo project's include graph if self.dryRun: print "\n".join( action.preview() ) else: try: action.execute( self.keepGoing, self.jobs ) except CompoundException, e: Log.error( "build failed", e ) finally:
def doExecute( self ): Log.info( self.computePreview() ) urllib.urlretrieve( self.__originUrl, self.__destinationFile, DownloadFileAction.Hook() ) print