docs: def check_complete(self):
          """ Runs completion flow for this task if it's finished. """
          logger.debug('Running check_complete for task {0}'.format(self.name))
  
          # Tasks not completed
          if self.remote_not_complete() or self.local_not_complete():
              self._start_check_timer()
              return
  
          return_code = self.completed_task()
  
          # Handle task errors
          if self.terminate_sent:
              self.stderr += '\nDAGOBAH SENT SIGTERM TO THIS PROCESS\n'
          if self.kill_sent:
              self.stderr += '\nDAGOBAH SENT SIGKILL TO THIS PROCESS\n'
          if self.remote_failure:
              return_code = -1
              self.stderr += '\nAn error occurred with the remote machine.\n'
  
          self.stdout_file = None
          self.stderr_file = None
  
          self._task_complete(success=True if return_code == 0 else False,
                              return_code=return_code,
                              stdout=self.stdout,
                              stderr=self.stderr,
                              start_time=self.started_at,
                              complete_time=datetime.utcnow())