From 3d78ece84ed5c499971c800e97451c89f7182f26 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Mon, 11 Mar 2013 12:37:01 -0400 Subject: [PATCH] Show 'doing housekeeping' status bar when flushing inventory --- bitmessagemain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitmessagemain.py b/bitmessagemain.py index 6fd078c3..952cbc6f 100755 --- a/bitmessagemain.py +++ b/bitmessagemain.py @@ -2311,9 +2311,8 @@ class singleCleaner(QThread): while True: 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() + self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"Doing housekeeping (Flushing inventory in memory to disk...)") for hash, storedValue in inventory.items(): objectType, streamNumber, payload, receivedTime = storedValue if int(time.time())- 3600 > receivedTime: @@ -2322,6 +2321,7 @@ class singleCleaner(QThread): sqlSubmitQueue.put(t) sqlReturnQueue.get() del inventory[hash] + self.emit(SIGNAL("updateStatusBar(PyQt_PyObject)"),"") 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. if timeWeLastClearedInventoryAndPubkeysTables < int(time.time()) - 7380: