+ Now log running seconds in heartbeat
* Do not spam "could not connect to any peer" if we have a peer connected
This commit is contained in:
parent
6fd0f9aded
commit
92b0ad975f
@ -33,6 +33,7 @@ class OnionrCommunicatorDaemon:
|
|||||||
self.powSalt = 0
|
self.powSalt = 0
|
||||||
self.delay = 1
|
self.delay = 1
|
||||||
self.proxyPort = sys.argv[2]
|
self.proxyPort = sys.argv[2]
|
||||||
|
self.startTime = self._core._utils.getEpoch()
|
||||||
|
|
||||||
self.onlinePeers = []
|
self.onlinePeers = []
|
||||||
self.offlinePeers = []
|
self.offlinePeers = []
|
||||||
@ -223,7 +224,8 @@ class OnionrCommunicatorDaemon:
|
|||||||
tried.append(address)
|
tried.append(address)
|
||||||
logger.debug('failed to connect to ' + address)
|
logger.debug('failed to connect to ' + address)
|
||||||
else:
|
else:
|
||||||
logger.warn('Could not connect to any peer')
|
if len(self.onlinePeers) == 0:
|
||||||
|
logger.warn('Could not connect to any peer')
|
||||||
return retData
|
return retData
|
||||||
|
|
||||||
def printOnlinePeers(self):
|
def printOnlinePeers(self):
|
||||||
@ -253,7 +255,8 @@ class OnionrCommunicatorDaemon:
|
|||||||
|
|
||||||
def heartbeat(self):
|
def heartbeat(self):
|
||||||
'''Show a heartbeat debug message'''
|
'''Show a heartbeat debug message'''
|
||||||
logger.debug('Communicator heartbeat')
|
currentTime = self._core._utils.getEpoch() - self.startTime
|
||||||
|
logger.debug('heartbeat, running seconds: ' + str(currentTime))
|
||||||
self.decrementThreadCount('heartbeat')
|
self.decrementThreadCount('heartbeat')
|
||||||
|
|
||||||
def daemonCommands(self):
|
def daemonCommands(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user