You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting a socketify ASGI, for example falcon, raises AttributeError: module 'os' has no attribute 'fork'
To Reproduce
Steps to reproduce the behavior:
Create a file called falcon_test.py with the following code:
import falcon
import falcon.asgi
from socketify import ASGI
class Test:
async def on_get(self, req, resp):
"""Handles GET requests"""
resp.status = falcon.HTTP_200 # This is the default status
resp.content_type = falcon.MEDIA_TEXT # Default is JSON, so override
resp.text = (
'\nTwo things awe me most, the starry sky '
'above me and the moral law within me.\n'
'\n'
' ~ Immanuel Kant\n\n'
)
app = falcon.asgi.App()
test = Test()
app.add_route('/', test)
if __name__ == "__main__":
ASGI(app).listen(5000, lambda config: print(f"Listening on port http://localhost:{config.port} now\n")).run(workers=8)
Call python falcon_test.py
Expected behavior
ASGI server running on Windows.
The text was updated successfully, but these errors were encountered:
For now, we depend on os.fork so windows is not supported yet, but will add this feature in windows in the future for sure multiprocessing should do the trick
Describe the bug
Windows does not support os.fork
Starting a socketify ASGI, for example falcon, raises
AttributeError: module 'os' has no attribute 'fork'
To Reproduce
Steps to reproduce the behavior:
Expected behavior
ASGI server running on Windows.
The text was updated successfully, but these errors were encountered: