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

skip setproctitle in task_runner on Mac OS #45124

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions task_sdk/src/airflow/sdk/execution_time/task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,14 @@ def startup() -> tuple[RuntimeTaskInstance, Logger]:
msg = SUPERVISOR_COMMS.get_message()

if isinstance(msg, StartupDetails):
from setproctitle import setproctitle

setproctitle(f"airflow worker -- {msg.ti.id}")
# setproctitle causes issue on Mac OS: https://github.com/benoitc/gunicorn/issues/3021
os_type = sys.platform
if os_type == "darwin":
log.info("Mac OS detected, skipping setproctitle")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
log.info("Mac OS detected, skipping setproctitle")
log.debug("Mac OS detected, skipping setproctitle")

else:
from setproctitle import setproctitle

setproctitle(f"airflow worker -- {msg.ti.id}")

log = structlog.get_logger(logger_name="task")
# TODO: set the "magic loop" context vars for parsing
Expand Down
Loading