Skip to content

Commit

Permalink
formatting comment text
Browse files Browse the repository at this point in the history
  • Loading branch information
krcrouse authored and potiuk committed Jul 7, 2022
1 parent 2ba30e3 commit 1898966
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions airflow/jobs/local_task_job.py
Expand Up @@ -196,12 +196,12 @@ def heartbeat_callback(self, session=None):
same_process = recorded_pid == current_pid

if recorded_pid is not None and (ti.run_as_user or self.task_runner.run_as_user):
# when running as another user, compare the task runner pid to the parent of
# when running as another user, compare the task runner pid to the parent of
# the recorded pid because user delegation becomes an extra process level.
# However, if recorded_pid is None, pass that through as it signals the task
# runner process has already completed and been cleared out. `psutil.Process`
# uses the current process if the parameter is None, which is not what is intended
# for comparison.
# However, if recorded_pid is None, pass that through as it signals the task
# runner process has already completed and been cleared out. `psutil.Process`
# uses the current process if the parameter is None, which is not what is intended
# for comparison.
recorded_pid = psutil.Process(ti.pid).ppid()
same_process = recorded_pid == current_pid

Expand Down

0 comments on commit 1898966

Please sign in to comment.