Fixed github issue 63: Manage keys action triggered twice. #64
|
@ -2311,9 +2311,8 @@ class singleCleaner(QThread):
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(300)
|
time.sleep(300)
|
||||||
#Clear the status bar in case a message has been sitting there for a while.
|
|
||||||
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"")
|
|
||||||
sqlLock.acquire()
|
sqlLock.acquire()
|
||||||
|
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())- 3600 > receivedTime:
|
||||||
|
@ -2322,6 +2321,7 @@ class singleCleaner(QThread):
|
||||||
sqlSubmitQueue.put(t)
|
sqlSubmitQueue.put(t)
|
||||||
sqlReturnQueue.get()
|
sqlReturnQueue.get()
|
||||||
del inventory[hash]
|
del inventory[hash]
|
||||||
|
self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"")
|
||||||
sqlLock.release()
|
sqlLock.release()
|
||||||
broadcastToSendDataQueues((0, 'pong', 'no data')) #commands the sendData threads to send out a pong message if they haven't sent anything else in the last five minutes. The socket timeout-time is 10 minutes.
|
broadcastToSendDataQueues((0, 'pong', 'no data')) #commands the sendData threads to send out a pong message if they haven't sent anything else in the last five minutes. The socket timeout-time is 10 minutes.
|
||||||
if timeWeLastClearedInventoryAndPubkeysTables < int(time.time()) - 7380:
|
if timeWeLastClearedInventoryAndPubkeysTables < int(time.time()) - 7380:
|
||||||
|
|
Reference in New Issue
Block a user