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