Beispiel #1
0
    def __generateAllMissingWeeklyGraphicsSinceLasteUpdate(
            self, generateTotalsGraphics):
        """
            @summary : Generates the weekly 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")

        missingWeeks = updateManager.getMissingWeeksBetweenUpdates(
            updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest)
        oldTimeOfRequest = self.timeOfRequest

        for missingWeek in missingWeeks:
            self.timeOfRequest = missingWeek
            self.__generateAllRRDGraphicsForWebPage("weekly",
                                                    generateTotalsGraphics)
            self.__generateAllGraphicsForGroups("weekly")

        self.timeOfRequest = oldTimeOfRequest
    def __generateAllMissingWeeklyCsvFilesSinceLasteUpdate(
            self, clusters, cost):
        """
            @summary : Generates the weekly graphics that were not 
                       generated between last update and timeOfRequest
            
        """

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

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

            missingWeeks = updateManager.getMissingWeeksBetweenUpdates(
                updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest)

            oldTimeOfRequest = self.timeOfRequest

            for missingWeek in missingWeeks:
                self.timeOfRequest = missingWeek
                self.__generateAllRRDGraphicsForWebPage("weekly", True)
                self.__generateAllGraphicsForGroups("weekly")

            self.timeOfRequest = oldTimeOfRequest
 def __generateAllMissingWeeklyGraphicsSinceLasteUpdate( self, generateTotalsGraphics ):
     """
         @summary : Generates the weekly 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" )
     
     missingWeeks = updateManager.getMissingWeeksBetweenUpdates( updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest )        
     oldTimeOfRequest = self.timeOfRequest
     
     for missingWeek in missingWeeks:
         self.timeOfRequest = missingWeek
         self.__generateAllRRDGraphicsForWebPage( "weekly", generateTotalsGraphics )
         self.__generateAllGraphicsForGroups( "weekly" )
     
     self.timeOfRequest = oldTimeOfRequest    
 def __generateAllMissingWeeklyCsvFilesSinceLasteUpdate(self, clusters, cost):
     """
         @summary : Generates the weekly graphics that were not 
                    generated between last update and timeOfRequest
         
     """
     
     if clusters != [] and clusters != None:
         
         configParameters = StatsConfigParameters( )
         configParameters.getAllParameters()    
         updateManager = AutomaticUpdatesManager( configParameters.nbAutoUpdatesLogsToKeep, "pxStatsStartup" )
         
         missingWeeks = updateManager.getMissingWeeksBetweenUpdates( updateManager.getTimeOfLastUpdateInLogs(), self.timeOfRequest )
         
         oldTimeOfRequest = self.timeOfRequest
         
         for missingWeek in missingWeeks:
             self.timeOfRequest = missingWeek
             self.__generateAllRRDGraphicsForWebPage( "weekly", True )
             self.__generateAllGraphicsForGroups( "weekly" )
         
         self.timeOfRequest = oldTimeOfRequest