pierrejeambrun commented on code in PR #53122:
URL: https://github.com/apache/airflow/pull/53122#discussion_r2209771584
##########
airflow-core/src/airflow/executors/local_executor.py:
##########
@@ -60,6 +59,12 @@ def _run_worker(
log = logging.getLogger(logger_name)
log.info("Worker starting up pid=%d", os.getpid())
+ if sys.platform == "darwin":
+ log.debug("Mac OS detected, skipping setproctitle")
+ setproctitle = lambda title: None
+ else:
+ from setproctitle import setproctitle
Review Comment:
If we do something like this, we could put it at the top of the file, and
leave the rest of the code untouched, any access to the `setproctitle` variable
will either be the real setproctitle or the custom lambda. That could actually
be inside airflow compat, or aiflow.utils.setproctitle, and we just need to
make sure that any `setproctitle` is imported from `airflow` one.
```
if sys.platform == "darwin":
setproctitle = lambda title: log.debug("Mac OS detected, skipping
setproctitle")
else:
from setproctitle import setproctitle
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]