Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Windows #29935

Closed
wants to merge 16 commits into from
Closed
2 changes: 1 addition & 1 deletion airflow/jobs/local_task_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def heartbeat_callback(self, session=None):
recorded_pid = psutil.Process(ti.pid).ppid()
same_process = recorded_pid == current_pid

if recorded_pid is not None and not same_process:
if not IS_WINDOWS and recorded_pid is not None and not same_process:
uranusjr marked this conversation as resolved.
Show resolved Hide resolved
self.log.warning(
"Recorded pid %s does not match the current pid %s", recorded_pid, current_pid
)
Expand Down
4 changes: 3 additions & 1 deletion airflow/utils/process_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def on_terminate(p):
returncodes[p.pid] = p.returncode

def signal_procs(sig):
if IS_WINDOWS:
return
try:
logger.info("Sending the signal %s to group %s", sig, process_group_id)
os.killpg(process_group_id, sig)
Expand Down Expand Up @@ -108,7 +110,7 @@ def signal_procs(sig):
else:
raise

if process_group_id == os.getpgid(0):
if not IS_WINDOWS and process_group_id == os.getpgid(0):
raise RuntimeError("I refuse to kill myself")

try:
Expand Down