parameters: (self)
docstring: Check if timeouts have been reached.
docstring_summary: Check if timeouts have been reached.
docstring_tokens: Check if timeouts have been reached .
function: def _check_timeouts(self):
          """Check if timeouts have been reached."""
          if self._abort_timeout_reached:
              return
          execution_record = self._get_last_execution_record()
          start_time = execution_record.start_time
          now = time.time()
          if (self.job.abort_timeout_sec and
                  start_time + self.job.abort_timeout_sec < now):
              self._abort_timeout_reached = True
              self.abort()
              return
          if (not self._warn_timeout_reached and self.job.warn_timeout_sec and
                  start_time + self.job.warn_timeout_sec < now):
              self._warn_timeout_reached = True
              emails = self._get_emails()
              if not emails:
                  return
              execution = len(self.job.history) - 1
              job_execution_data = self._data_builder.get_execution(
                  self._workflow, self._instance, self._job_name, execution)
              self._emailer.send_job_timeout_warning_message(emails,
                                                             job_execution_data)
function_tokens: def _check_timeouts ( self ) : if self . _abort_timeout_reached : return execution_record = self . _get_last_execution_record ( ) start_time = execution_record . start_time now = time . time ( ) if ( self . job . abort_timeout_sec and start_time + self . job . abort_timeout_sec < now ) : self . _abort_timeout_reached = True self . abort ( ) return if ( not self . _warn_timeout_reached and self . job . warn_timeout_sec and start_time + self . job . warn_timeout_sec < now ) : self . _warn_timeout_reached = True emails = self . _get_emails ( ) if not emails : return execution = len ( self . job . history ) - 1 job_execution_data = self . _data_builder . get_execution ( self . _workflow , self . _instance , self . _job_name , execution ) self . _emailer . send_job_timeout_warning_message ( emails , job_execution_data )