Aiohttp: Add runner.serve_forever()

Created on 17 Feb 2018  Â·  13Comments  Â·  Source: aio-libs/aiohttp

All 13 comments

In this example it's called from loop, I guess it's a typo? loop.serve_forever() -> srv.serve_forever()

Good catch

Is this still open/relevant for a PR?

Yes, the issue is not implemented still.

@retnikt did you start working on this? I am currently working the issue :smile:

I began looking in to it, yes, but I did not make much progress. You're
free to take it.

On Fri, 4 Oct 2019 at 05:12, Pradhvan Bisht notifications@github.com
wrote:

@retnikt https://github.com/retnikt did you start working on this? I am
currently working the issue 😄

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aio-libs/aiohttp/issues/2746?email_source=notifications&email_token=AF3RNCQGJCLQEG4RSENDU6TQM27ETA5CNFSM4ERFN342YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAKKB4I#issuecomment-538222833,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF3RNCTIQXBPUUII2Y652ODQM27ETANCNFSM4ERFN34Q
.

@asvetlov i would like to work on this if it's available.

please do. Feel free to ask if you have any question

@asvetlov I am new to python but do I have to add something like

def serve_forever(self):
        self.stop = False
        while not self.stop:
            self.handle_request()

And where should I add it in aiohttp/web_runner.py? Should I make a new class?

@Soniyanayak51 if you're new to Python, you should first learn how async works.

It should be async function that is very close to Server.serve_forever() from asyncio.
The function cannot call Server.serve_forever() directly because it doesn't exist on Python 3.6 (which we should support).

@ayushkovskiy, still working on this? Since, the PR hasn't been updated from Nov 25, 2019, I would be happy to take it up. 😄

Sorry I stopped work on this PR. @Pradhvan sure you can take it up, thanks!

Was this page helpful?
0 / 5 - 0 ratings