original_docstring: Checks the slurm state of a study
  
          Args:
              job_id: The id of the job to be checked
  
          Returns:
              The slurm job state string if the server correctly returned id
  
          Raises:
              GetJobStateErrorException if the job_state has not been obtained
          
docstring: Checks the slurm state of a study
  Args:
  job_id: The id of the job to be checked
  
  The slurm job state string if the server correctly returned id
  
  GetJobStateErrorException if the job_state has not been obtained
docstring_tokens: Checks the slurm state of a study Args : job_id : The id of the job to be checked The slurm job state string if the server correctly returned id GetJobStateErrorException if the job_state has not been obtained
code: def _check_job_state(self, job_id: int):
          """Checks the slurm state of a study
  
          Args:
              job_id: The id of the job to be checked
  
          Returns:
              The slurm job state string if the server correctly returned id
  
          Raises:
              GetJobStateErrorException if the job_state has not been obtained
          """
          command = self._compose_command_to_get_state_as_one_word(job_id)
          max_number_of_tries = 5
          seconds_to_wait = 0.5
          for _ in range(max_number_of_tries):
              output, error = self.connection.execute_command(command)
              if error:
                  raise GetJobStateErrorException
              stdout = str(output).split()
              if stdout:
                  return stdout[0]
              time.sleep(seconds_to_wait)
  
          raise GetJobStateOutputException
code_tokens: def _check_job_state ( self , job_id : int ) : command = self . _compose_command_to_get_state_as_one_word ( job_id ) max_number_of_tries = 5 seconds_to_wait = 0.5 for _ in range ( max_number_of_tries ) : output , error = self . connection . execute_command ( command ) if error : raise GetJobStateErrorException stdout = str ( output ) . split ( ) if stdout : return stdout [ 0 ] time . sleep ( seconds_to_wait ) raise GetJobStateOutputException
short_docstring: Checks the slurm state of a study
  Args:
  job_id: The id of the job to be checked
short_docstring_tokens: Checks the slurm state of a study Args : job_id : The id of the job to be checked
comment: """Checks the slurm state of a study
  
          Args:
              job_id: The id of the job to be checked
  
          Returns:
              The slurm job state string if the server correctly returned id
  
          Raises:
              GetJobStateErrorException if the job_state has not been obtained
          """