예제 #1
0
    def __generateAllMissingMonthlyGraphicsSinceLasteUpdate(
            self, generateTotalsGraphics):
        """
            @summary : Generates the monthly graphics that were not 
                       generated between last update and timeOfRequest
                       
            @param generateTotalsGraphics: Whether or not to generate the totals graphics.  
        """

        configParameters = StatsConfigParameters()
        configParameters.getAllParameters()
        updateManager = AutomaticUpdatesManager(
            configParameters.nbAutoUpdatesLogsToKeep, "pxStatsStartup")

        missingMonths = updateManager.getMissingMonthsBetweenUpdates(
            updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest)

        oldTimeOfRequest = self.timeOfRequest

        for missingMonth in missingMonths:
            self.timeOfRequest = missingMonth
            self.__generateAllRRDGraphicsForWebPage("monthly",
                                                    generateTotalsGraphics)
            self.__generateAllGraphicsForGroups("monthly")

        self.timeOfRequest = oldTimeOfRequest
예제 #2
0
    def __generateAllMissingMonthlyCsvFilesSinceLasteUpdate(
            self, clusters, cost):
        """
            @summary : Generates the monthly graphics that were not 
                       generated between last update and timeOfRequest
            
        """

        if clusters != [] and clusters != None:

            configParameters = StatsConfigParameters()
            configParameters.getAllParameters()
            updateManager = AutomaticUpdatesManager(
                configParameters.nbAutoUpdatesLogsToKeep, "pxStatsStartup")

            missingMonths = updateManager.getMissingMonthsBetweenUpdates(
                updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest)

            oldTimeOfRequest = self.timeOfRequest

            for missingMonth in missingMonths:
                self.timeOfRequest = missingMonth
                self.__generateAllRRDGraphicsForWebPage("monthly", True)
                self.__generateAllGraphicsForGroups("monthly")

            self.timeOfRequest = oldTimeOfRequest
예제 #3
0
 def __generateAllMissingMonthlyGraphicsSinceLasteUpdate( self, generateTotalsGraphics ):
     """
         @summary : Generates the monthly graphics that were not 
                    generated between last update and timeOfRequest
                    
         @param generateTotalsGraphics: Whether or not to generate the totals graphics.  
     """
     
     configParameters = StatsConfigParameters( )
     configParameters.getAllParameters()    
     updateManager = AutomaticUpdatesManager( configParameters.nbAutoUpdatesLogsToKeep, "pxStatsStartup" )
     
     missingMonths = updateManager.getMissingMonthsBetweenUpdates( updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest )
     
     oldTimeOfRequest = self.timeOfRequest
     
     for missingMonth in missingMonths:
         self.timeOfRequest = missingMonth
         self.__generateAllRRDGraphicsForWebPage( "monthly", generateTotalsGraphics )
         self.__generateAllGraphicsForGroups( "monthly" )
         
     self.timeOfRequest = oldTimeOfRequest     
예제 #4
0
 def __generateAllMissingMonthlyCsvFilesSinceLasteUpdate(self, clusters, cost):
     """
         @summary : Generates the monthly graphics that were not 
                    generated between last update and timeOfRequest
         
     """
     
     if clusters != [] and clusters != None:
         
         configParameters = StatsConfigParameters( )
         configParameters.getAllParameters()    
         updateManager = AutomaticUpdatesManager( configParameters.nbAutoUpdatesLogsToKeep, "pxStatsStartup" )
         
         missingMonths = updateManager.getMissingMonthsBetweenUpdates( updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest )
         
         oldTimeOfRequest = self.timeOfRequest
         
         for missingMonth in missingMonths:
             self.timeOfRequest = missingMonth
             self.__generateAllRRDGraphicsForWebPage( "monthly", True )
             self.__generateAllGraphicsForGroups( "monthly" )
             
         self.timeOfRequest = oldTimeOfRequest