Michael-cd30 commented on issue #14813:
URL: https://github.com/apache/airflow/issues/14813#issuecomment-1951946474
> > You can instead write your own "run" function and send output to
logger.getLogger("airflow.task").
> > I've written this one to meet my needs.
> > `...`
>
> This will deadlock if stderr produces enough output to fill the buffer.
See warning under
https://docs.python.org/3/library/subprocess.html#subprocess.Popen.stderr This
is why `POpen.communicate()` exists. For streaming output, the easiest is to
merge the two streams into one using `stderr=subprocess.STDOUT`, then it is
safe to `read()` stdout incrementally.
>
> If you really care about streaming both streams individually, the solution
becomes incredibly complex using `select` and other more low level primitives.
Thanks for this advice, I'll look carefully.
--
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]