@stuz5000 From your web application's point of view you've got a typical I/O bound model here. bjoern does not care about I/O out of the box -- you'll have to make your application yield manually: A loop like
while not done(): yield
which will be polled by the bjoern event loop. But this doesn't scale well and wastes loads of CPU. You'll be off much better using something like gunicorn/geventlet, meinheld, or something asyncio based like uvloop.
I was hoping maybe someone can help me out, I must be doing something wrong here but I've tried everything and cant figure it out.
Im getting the following error:
Traceback (most recent call last): File "./src/bjoern.py", line 5, in <module> bjoern.run(api.app) AttributeError: module 'bjoern' has no attribute 'run'
bjoern.py file contains the following:
import bjoern import api if __name__ == '__main__': bjoern.run(api.app)
Hey everyone. This might be handy for some in here. Here is an example of starting a WSGI application (Django, Flask, etc.) with Bjoern with N number of worker processes.