def __init__( self ): """ Constructor, initializes the logger, rssClient and caches. examples >>> resourceStatus = ResourceStatus() """ super( ResourceStatus, self ).__init__() self.siteStatus = SiteStatus() # We can set CacheLifetime and CacheHistory from CS, so that we can tune them. cacheLifeTime = int( RssConfiguration().getConfigCache() ) # RSSCaches, one per elementType ( StorageElement, ComputingElement ) # Should be generated on the fly, instead of being hardcoded ? self.seCache = RSSCache( 'Storage', cacheLifeTime, self._updateSECache ) self.ceCache = RSSCache( 'Computing', cacheLifeTime, self._updateCECache )
def __init__(self): """ Constructor, initializes the logger, rssClient and cache. examples >>> siteStatus = SiteStatus() """ super(SiteStatus, self).__init__() # RSSCache initialization cacheLifeTime = int(RssConfiguration().getConfigCache()) self.siteCache = RSSCache('Site', cacheLifeTime, self.__updateSiteCache)
def __init__( self ): """ Constructor, initializes the logger, rssClient and cache. examples >>> siteStatus = SiteStatus() """ super( SiteStatus, self ).__init__() # RSSCache initialization cacheLifeTime = int( RssConfiguration().getConfigCache() ) # FIXME: we need to define the types in the CS : Site => {Computing,Storage,..}Access self.siteCache = RSSCache( 'Site', cacheLifeTime, self.__updateSiteCache )