if not self.already_shutdown:
logging.debug(f'Shutting down RemoteExecutor {self.title}')
self.heartbeat_stop_event.set()
self.heartbeat_thread.join()
self._helper_executor.shutdown(wait)
if not self.already_shutdown:
logging.debug(f'Shutting down RemoteExecutor {self.title}')
self.heartbeat_stop_event.set()
self.heartbeat_thread.join()
self._helper_executor.shutdown(wait)