def start(self): self.store = LruCacheStore(FileStore(self.cacheDir), MAX_TILES_IN_MEMORY) self.delayBox.start() self.subscriber.start() for index in self.indexes.itervalues(): print print '###################################################' print '# initializing map index:', index.valueCode print '###################################################' index.start()
def start(self): self.store = LruCacheStore(FileStore(self.cacheDir), SEGMENTS_IN_MEMORY_PER_TIME_SERIES) self.delayBox.start() if self.subscriber: self.queryManager.subscribeDjango( self.subscriber, lambda topic, obj: self.handleRecord(obj)) self.running = True self.statusPath = os.path.join(self.segmentDir, 'status.json') self.statusStore = plotUtil.JsonStore(self.statusPath) self.status = self.statusStore.read(dflt={ 'minTime': None, 'maxTime': None, 'numSamples': 0, 'numSegments': 0 }) self.statusStore.write(self.status) if self.queueMode: self.batchIndex()
def test_LruCacheStore(self): self.storeTest(lambda path: LruCacheStore(FileStore(path), 5))