Issue #3526 Fix errors found during testing in SS
Change-Id: Ic2a7f0b38f57fcae6b3fea904a457642472b2157 Former-commit-id:ba501a4210
[formerly 0e3e60bcc4b8adcb9efa51df28d4b35bb6228ed7] Former-commit-id:5407eb6a71
This commit is contained in:
parent
c6f73593e4
commit
12dbec98fd
1 changed files with 7 additions and 4 deletions
|
@ -289,9 +289,12 @@ class WECache(object):
|
|||
saveSize = 0 # number of grids in saveRequest
|
||||
|
||||
# get full time range for flush
|
||||
sortedList = sorted(trList, key=lambda t: t[0])
|
||||
flushTR = (sortedList[0][0], sortedList[-1][1])
|
||||
|
||||
if (len(trList)):
|
||||
sortedList = sorted(trList, key=lambda t: t[0])
|
||||
flushTR = (sortedList[0][0], sortedList[-1][1])
|
||||
else:
|
||||
flushTR = (0, 2**31-1) # all times
|
||||
|
||||
timeSpan = None # time span if this contiguous batch
|
||||
gridsToSave = ArrayList(self._batchSize) # grids in this contiguous batch
|
||||
saveBatch = False
|
||||
|
@ -420,7 +423,7 @@ class WECache(object):
|
|||
def flush(self):
|
||||
"""Writes all dirty time ranges in the WECache to HDF5/DB"""
|
||||
# flush entire inventory
|
||||
self.__flushGrids(self._dirty)
|
||||
self.__flushGrids(self.keys())
|
||||
|
||||
def overlaps(self, tr1, tr2):
|
||||
if (tr1[0] >= tr2[0] and tr1[0] < tr2[1]) or \
|
||||
|
|
Loading…
Add table
Reference in a new issue