We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from aiohttp import web import asyncio app = web.Application() async def ls(): stdout = None proc = await asyncio.create_subprocess_shell( "ls", stdout=asyncio.subprocess.PIPE, ) stdout, _ = await proc.communicate() print(f"return code: {proc.returncode}") asyncio.run(ls())
I run this code in 3 ways:
poetry run gunicorn --worker-class aiohttp.GunicornUVLoopWebWorker test_subprocess:app
return code: 0
poetry run python test_subprocess.py
poetry run gunicorn --worker-class aiohttp.GunicornWebWorker test_subprocess:app
child process pid 339436 exit status already read: will report returncode 255 return code: 255
Workaround to get the right return code with aiohttp.GunicornWebWorker : Add following line on the script:
asyncio.set_child_watcher(asyncio.FastChildWatcher())
Issue: asyncio.FastChildWatcher() is marked deprecated and will be removed on python 3.14
The text was updated successfully, but these errors were encountered:
Thanks for the quality report! Related: aio-libs/aiohttp#7038
Sorry, something went wrong.
No branches or pull requests
I run this code in 3 ways:
poetry run gunicorn --worker-class aiohttp.GunicornUVLoopWebWorker test_subprocess:app
poetry run python test_subprocess.py
poetry run gunicorn --worker-class aiohttp.GunicornWebWorker test_subprocess:app
Workaround to get the right return code with aiohttp.GunicornWebWorker :
Add following line on the script:
Issue:
asyncio.FastChildWatcher() is marked deprecated and will be removed on python 3.14
The text was updated successfully, but these errors were encountered: