From b1a7641db958cbf6a1154ab736f08e72d5362fc9 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 27 Jan 2020 02:09:28 -0600 Subject: [PATCH] removed defunct communicator methods --- src/communicator/__init__.py | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/src/communicator/__init__.py b/src/communicator/__init__.py index d863c57e..304e8011 100755 --- a/src/communicator/__init__.py +++ b/src/communicator/__init__.py @@ -1,10 +1,9 @@ -""" - Onionr - Private P2P Communication +"""Onionr - Private P2P Communication. - This file contains both the OnionrCommunicate class for - communcating with peers and code to operate as a daemon, - getting commands from the command queue database - (see core.Core.daemonQueue) +This file contains both the OnionrCommunicate class for +communcating with peers and code to operate as a daemon, +getting commands from the command queue database +(see core.Core.daemonQueue) """ import os import time @@ -136,7 +135,6 @@ class OnionrCommunicatorDaemon: peerPoolTimer = OnionrCommunicatorTimers( self, onlinepeers.get_online_peers, 60, max_threads=1, my_args=[self]) - OnionrCommunicatorTimers(self, self.runCheck, 2, max_threads=1) # Timers to periodically lookup new blocks and download them lookup_blocks_timer = OnionrCommunicatorTimers( @@ -269,7 +267,6 @@ class OnionrCommunicatorDaemon: # Stop onionr direct connection services for server in self.service_greenlets: server.stop() - localcommand.local_command('shutdown') # shutdown the api try: time.sleep(0.5) except KeyboardInterrupt: @@ -325,20 +322,7 @@ class OnionrCommunicatorDaemon: humanreadabletime.human_readable_time(self.getUptime())) self.decrementThreadCount('heartbeat') - def runCheck(self): - """Show message if run file exists""" - if run_file_exists(self): - logger.debug('Status check; looks good.') - - self.decrementThreadCount('runCheck') - def startCommunicator(shared_state): OnionrCommunicatorDaemon(shared_state) - -def run_file_exists(daemon): - if os.path.isfile(filepaths.run_check_file): - os.remove(filepaths.run_check_file) - return True - return False