parameters: (self)
docstring: Will find the pid that isn't used but is present in the workbench-recovery directory
          :return: String; The full path to the pid directory
docstring_summary: Will find the pid that isn't used but is present in the workbench-recovery directory
          :return: String; The full path to the pid directory
docstring_tokens: Will find the pid that isn t used but is present in the workbench - recovery directory : return : String ; The full path to the pid directory
function: def get_pid_folder_to_load_a_checkpoint_from(self):
          """
          Will find the pid that isn't used but is present in the workbench-recovery directory
          :return: String; The full path to the pid directory
          """
          # Get all pids and order them
          paths = self.listdir_fullpath(self.recovery_directory_hostname)
          paths = self.sort_by_last_modified(paths)
  
          # Get just the pids in a list
          pids = []
          for path in paths:
              pids.append(int(os.path.basename(path)))
  
          for pid in pids:
              return_current_pid = True
              if psutil.pid_exists(pid):
                  try:
                      return_current_pid = not self._is_mantid_workbench_process(self._make_process_from_pid(pid=pid).cmdline())
                  except psutil.AccessDenied:
                      # if we can't access the process properties then we assume it is not a mantid process
                      pass
  
              if return_current_pid:
                  return os.path.join(self.recovery_directory_hostname, str(pid))
function_tokens: def get_pid_folder_to_load_a_checkpoint_from ( self ) : # Get all pids and order them paths = self . listdir_fullpath ( self . recovery_directory_hostname ) paths = self . sort_by_last_modified ( paths ) # Get just the pids in a list pids = [ ] for path in paths : pids . append ( int ( os . path . basename ( path ) ) ) for pid in pids : return_current_pid = True if psutil . pid_exists ( pid ) : try : return_current_pid = not self . _is_mantid_workbench_process ( self . _make_process_from_pid ( pid = pid ) . cmdline ( ) ) except psutil . AccessDenied : # if we can't access the process properties then we assume it is not a mantid process pass if return_current_pid : return os . path . join ( self . recovery_directory_hostname , str ( pid ) )