When flushing inventory in memory, clear items older than 5 minutes, not 60 minutes
This commit is contained in:
parent
2911b61412
commit
c4c0286768
|
@ -2008,7 +2008,7 @@ class singleCleaner(QThread):
|
||||||
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"Doing housekeeping (Flushing inventory in memory to disk...)")
|
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"Doing housekeeping (Flushing inventory in memory to disk...)")
|
||||||
for hash, storedValue in inventory.items():
|
for hash, storedValue in inventory.items():
|
||||||
objectType, streamNumber, payload, receivedTime = storedValue
|
objectType, streamNumber, payload, receivedTime = storedValue
|
||||||
if int(time.time())- 3600 > receivedTime:
|
if int(time.time())- 600 > receivedTime:
|
||||||
t = (hash,objectType,streamNumber,payload,receivedTime)
|
t = (hash,objectType,streamNumber,payload,receivedTime)
|
||||||
sqlSubmitQueue.put('''INSERT INTO inventory VALUES (?,?,?,?,?)''')
|
sqlSubmitQueue.put('''INSERT INTO inventory VALUES (?,?,?,?,?)''')
|
||||||
sqlSubmitQueue.put(t)
|
sqlSubmitQueue.put(t)
|
||||||
|
|
Reference in New Issue
Block a user