'Run the task command
:param run_with: list of tokens to run the task command with
E.g. [\'bash\', \'-c\']
:type run_with: list
:param join_args: whether to concatenate the list of command tokens
E.g. [\'airflow\', \'run\'] vs [\'airflow run\']
:param join_args: bool
:return: the process that was run
:rtype: subprocess.Popen'

def run_command(self, run_with, join_args=False):

    cmd = (['    '.join(self._command)] if join_args else self._command)
    full_cmd = (run_with + cmd)
    self.logger.info('Running:    {}'.format(full_cmd))
    proc = subprocess.Popen(full_cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
    log_reader = threading.Thread(target=self._read_task_logs, args=(proc.stdout,))
    log_reader.daemon = True
    log_reader.start()
    return proc
